aboutsummaryrefslogtreecommitdiffhomepage
path: root/apioforum/templates/view_forum.html
diff options
context:
space:
mode:
Diffstat (limited to 'apioforum/templates/view_forum.html')
-rw-r--r--apioforum/templates/view_forum.html24
1 files changed, 20 insertions, 4 deletions
diff --git a/apioforum/templates/view_forum.html b/apioforum/templates/view_forum.html
index 649c87c..c1906b6 100644
--- a/apioforum/templates/view_forum.html
+++ b/apioforum/templates/view_forum.html
@@ -83,7 +83,26 @@ please log in to create a new thread
you do not have permission to create threads in this forum
{% endif %}
-{% if has_permission(forum.id, g.user, "p_view_threads", login_required=False) %}
+{% macro sortby_option(code, text) %}
+{% if current_sortby==code %}
+<option selected value="{{code}}">{{text}}</option>
+{% else %}
+<option value="{{code}}">{{text}}</option>
+{% endif %}
+{% endmacro %}
+
+<form class="inline-form small-form" method="get">
+ <label for="sortby">sort threads by</label>
+ <select name="sortby">
+ {{ sortby_option("ad", "last activity (newest first)") }}
+ {{ sortby_option("aa", "last activity (oldest first)") }}
+ {{ sortby_option("cd", "creation time (newest first)") }}
+ {{ sortby_option("ca", "creation time (oldest first)") }}
+ </select>
+ <input type="submit" value="go">
+</form>
+</p>
+
{{ pagination_nav(page,max_pageno,'forum.view_forum',forum_id=forum.id) }}
<div class="thread-list">
{%for thread in threads%}
@@ -136,7 +155,4 @@ you do not have permission to create threads in this forum
</div>
-{% else %}
-<p>you do not have permission to view threads in this forum</p>
-{% endif %}
{%endblock%}