diff options
| author | rebecca <ubq323@ubq323.website> | 2026-11-02 22:50:43 +0000 |
|---|---|---|
| committer | rebecca <ubq323@ubq323.website> | 2026-11-02 22:50:43 +0000 |
| commit | e7eaacc10700e7769591f373c175acd7d95b8f06 (patch) | |
| tree | 8a314148b90f16f867bb8a67623efd55a6afc2fb | |
| parent | 0a017c66a0c6824106ce9a73d020c717f214724b (diff) | |
split into src and history actionbuttons
| -rw-r--r-- | apioforum/templates/common.html | 11 | ||||
| -rw-r--r-- | apioforum/templates/view_post.html | 6 |
2 files changed, 8 insertions, 9 deletions
diff --git a/apioforum/templates/common.html b/apioforum/templates/common.html index b64630b..6ef34f2 100644 --- a/apioforum/templates/common.html +++ b/apioforum/templates/common.html @@ -48,13 +48,10 @@ <a class="actionbutton" href="{{url_for('thread.delete_post',post_id=post.id)}}">delete</a> {% endif %} - <a class="actionbutton" - href="{{url_for('thread.view_post',post_id=post.id)}}"> - {%- if post.wiki == 1 or is_admin() or g.user == post.author -%} - src and history and also you can change the colour of the bike shed - {%- else -%} - src - {%- endif -%} + <a class="actionbutton" href="{{url_for('thread.view_post',post_id=post.id)}}">src</a> + {% if post.wiki == 1 or is_admin() or g.user == post.author %} + <a class="actionbutton" href="{{url_for('thread.view_post',post_id=post.id,_anchor='history')}}">history</a> + {% endif %} </a> {% endif %} diff --git a/apioforum/templates/view_post.html b/apioforum/templates/view_post.html index 810794e..6c3fe73 100644 --- a/apioforum/templates/view_post.html +++ b/apioforum/templates/view_post.html @@ -21,7 +21,7 @@ </details> {% if history %} -<h2>revision history</h2> +<h2 id="history">revision history</h2> <table class="history"> {% for rev in history %} <tr> @@ -30,7 +30,9 @@ {% if rev.id == revision.id or (loop.index == 1 and not revision) %} <b>{{ts(rev.time)}} ago</b> {% else %} - <a href="{{url_for('thread.view_post',post_id=post.id,revision=rev.id if loop.index!=1 else None)}}"> + <a href="{{url_for('thread.view_post', + post_id=post.id,revision=rev.id if loop.index!=1 else None, + _anchor='history')}}"> {{ts(rev.time)}} ago </a> {% endif %} |
