diff options
Diffstat (limited to 'apioforum/templates/view_forum.html')
-rw-r--r-- | apioforum/templates/view_forum.html | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/apioforum/templates/view_forum.html b/apioforum/templates/view_forum.html index c1906b6..bac06e4 100644 --- a/apioforum/templates/view_forum.html +++ b/apioforum/templates/view_forum.html @@ -26,13 +26,6 @@ <p>your role in this forum: {{role}}</p> {% endif %} - <p>available tags: - {% for the_tag in avail_tags %} - {{tag(the_tag)}} - {% else %} - <em>(none available)</em> - {% endfor %} - </p> </div> <p> @@ -91,6 +84,12 @@ you do not have permission to create threads in this forum {% endif %} {% endmacro %} +<details +{%- if current_sortby != "ad" or tagfilter_tag is not none %} + open +{%- endif -%}> + <summary>sorting and filtering options</summary> + <form class="inline-form small-form" method="get"> <label for="sortby">sort threads by</label> <select name="sortby"> @@ -100,7 +99,27 @@ you do not have permission to create threads in this forum {{ sortby_option("ca", "creation time (oldest first)") }} </select> <input type="submit" value="go"> + {% if tagfilter_tag is not none %} + <input type="hidden" name="tagfilter" value="{{tagfilter_tag.id}}"> + {% endif %} </form> + +{% if tagfilter_tag is none %} +<p>filter by tag: +{% for the_tag in avail_tags %} +{{tag(the_tag,href=url_for('forum.view_forum',forum_id=forum.id, + sortby=current_sortby,tagfilter=the_tag.id))}} + +{% else %} +<em>(none available)</em> +{% endfor %} +</p> +{% else %} +<p>only showing posts with the {{tag(tagfilter_tag)}} tag. +<a href="{{url_for('forum.view_forum',forum_id=forum.id,sortby=current_sortby)}}"> stop filtering</a> +</p> +{% endif %} +</details> </p> {{ pagination_nav(page,max_pageno,'forum.view_forum',forum_id=forum.id) }} |