diff options
| author | rebecca <ubq323@ubq323.website> | 2026-11-09 22:00:09 +0000 |
|---|---|---|
| committer | rebecca <ubq323@ubq323.website> | 2026-11-09 22:04:27 +0000 |
| commit | 39217ad599d1361194f23a12b4582b9fe00f543f (patch) | |
| tree | e6ea120b44d8dce17c30782576aaf3a3ab342f8a | |
| parent | 80d52d4b426766f03e85885b96b56b65599d73ac (diff) | |
show latest revision summary on wiki pageswiki
| -rw-r--r-- | apioforum/static/style.css | 1 | ||||
| -rw-r--r-- | apioforum/templates/common.html | 5 | ||||
| -rw-r--r-- | apioforum/templates/view_thread.html | 16 |
3 files changed, 16 insertions, 6 deletions
diff --git a/apioforum/static/style.css b/apioforum/static/style.css index 6b8ad14..91ce6b0 100644 --- a/apioforum/static/style.css +++ b/apioforum/static/style.css @@ -57,6 +57,7 @@ summary { user-select: none; } .post-heading-b { float: right; margin-right: 0.5em } .post-footer { margin-left: 0.2em; font-style: italic; } +.wiki-footer-comment { font-style: normal; } .post-anchor-link { color: var(--username-colour); } diff --git a/apioforum/templates/common.html b/apioforum/templates/common.html index 7c07f16..7f90cfd 100644 --- a/apioforum/templates/common.html +++ b/apioforum/templates/common.html @@ -30,7 +30,7 @@ {{ts(post.created)}} - {% if post.edited %} + {% if not post.wiki and post.edited %} (edited {{ts(post.updated)}}) {% endif %} </span> @@ -55,7 +55,8 @@ </a> {% endif %} - <a class="post-anchor-link" href="{{post_jump(post.id)}}">#{{post.id}}</a>/{{post.rev_index}} + <a class="post-anchor-link" href="{{post_jump(post.id)}}">#{{post.id}}</a> + {%-if buttons %}/{{post.rev_index}}{% endif -%} </span> </div> <div class="post-content md"> diff --git a/apioforum/templates/view_thread.html b/apioforum/templates/view_thread.html index e5d69c7..3b25275 100644 --- a/apioforum/templates/view_thread.html +++ b/apioforum/templates/view_thread.html @@ -1,4 +1,4 @@ -{% from 'common.html' import disp_post,tag_in_forum,thread_breadcrumb,vote_meter,pagination_nav %} +{% from 'common.html' import ts,disp_post,tag_in_forum,thread_breadcrumb,vote_meter,pagination_nav %} {% extends 'base.html' %} {% block header %} <h1>{%block title %}{{thread.title}}{% endblock %} <span class="thing-id">#{{thread.id}}</span></h1> @@ -32,7 +32,7 @@ </span> </div> -{% macro show_post(post) %} +{% macro show_post(post,wiki_body=False) %} {% if votes[post.id] %} {% set vote = votes[post.id] %} @@ -62,7 +62,15 @@ {% endset %} {{ disp_post(post, forum=thread.forum, buttons=True, footer=footer) }} - + + {% elif wiki_body and post.wiki and post.edited %} + {% set footer %} + {{disp_user(post.editor)}} {{ts(post.updated)}}: + <span class="wiki-footer-comment">{{post.comment}}</span> + {% endset %} + + {{ disp_post(post, forum=thread.forum, buttons=True, footer=footer) }} + {% else %} {{ disp_post(post, forum=thread.forum, buttons=True) }} {% endif %} @@ -70,7 +78,7 @@ {% if wiki_body %} <div class="wiki-body"> - {{show_post(wiki_body)}} + {{show_post(wiki_body,True)}} </div> {% endif %} |
