diff options
author | citrons <citrons@mondecitronne.com> | 2025-06-16 23:22:05 -0500 |
---|---|---|
committer | ubq323 <ubq323@ubq323.website> | 2025-06-17 12:05:31 +0100 |
commit | ebf7fe7336de9567360bfa33e201165a4ddd1a0b (patch) | |
tree | 8994b7bcbae3428d8609acdbad7bb49aa0a41ad9 /apioforum/templates | |
parent | 0a37c14c856beadd57bb2037e4e6ec3623c11e25 (diff) |
click tag to filter by that tag
Diffstat (limited to 'apioforum/templates')
-rw-r--r-- | apioforum/templates/common.html | 4 | ||||
-rw-r--r-- | apioforum/templates/view_forum.html | 4 | ||||
-rw-r--r-- | apioforum/templates/view_thread.html | 4 |
3 files changed, 8 insertions, 4 deletions
diff --git a/apioforum/templates/common.html b/apioforum/templates/common.html index 96d00a2..829e36a 100644 --- a/apioforum/templates/common.html +++ b/apioforum/templates/common.html @@ -84,6 +84,10 @@ </{{el}}> {%- endmacro %} +{% macro tag_in_forum(forum_id,the_tag) %} +{{tag(the_tag,href=url_for('forum.view_forum',forum_id=forum_id,tagfilter=the_tag.id))}} +{% endmacro %} + {% macro ab(name,href) -%} <a class="actionbutton" href="{{href}}">{{name}}</a> {%- endmacro %} diff --git a/apioforum/templates/view_forum.html b/apioforum/templates/view_forum.html index ddfb950..8ab6f42 100644 --- a/apioforum/templates/view_forum.html +++ b/apioforum/templates/view_forum.html @@ -1,5 +1,5 @@ {% extends 'base.html' %} -{% from 'common.html' import ts, tag, disp_user, post_url, forum_breadcrumb, ab, vote_meter, pagination_nav %} +{% from 'common.html' import ts, tag, tag_in_forum, disp_user, post_url, forum_breadcrumb, ab, vote_meter, pagination_nav %} {% block header %} <h1>{% block title %}{{forum.name}}{% endblock %} <span class="thing-id">#{{forum.id}}</span></h1> {% if forum.id != 1 %} @@ -153,7 +153,7 @@ you do not have permission to create threads in this forum </div> <div class="thread-listing-tags"> {% for the_tag in thread_tags[thread.id] %} - {{tag(the_tag)}} + {{tag_in_forum(forum.id,the_tag)}} {% endfor %} </div> <div class="thread-listing-creation"> diff --git a/apioforum/templates/view_thread.html b/apioforum/templates/view_thread.html index fa707a6..56f98e1 100644 --- a/apioforum/templates/view_thread.html +++ b/apioforum/templates/view_thread.html @@ -1,4 +1,4 @@ -{% from 'common.html' import disp_post,tag,thread_breadcrumb,vote_meter,pagination_nav %} +{% from 'common.html' import 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> @@ -27,7 +27,7 @@ <span class="thread-top-bar-b"> {% for the_tag in tags %} - {{ tag(the_tag) }} + {{ tag_in_forum(thread.forum,the_tag) }} {% endfor %} </span> </div> |