From 2a301de29feb08d40a9740a574dbef8b07bd595c Mon Sep 17 00:00:00 2001 From: Michael Save Date: Sat, 21 Apr 2012 15:15:32 +1000 Subject: Paginate ?/noticeboard --- templates/mod/ban_list.html | 2 +- templates/mod/log.html | 2 +- templates/mod/noticeboard.html | 65 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 67 insertions(+), 2 deletions(-) create mode 100644 templates/mod/noticeboard.html (limited to 'templates/mod') diff --git a/templates/mod/ban_list.html b/templates/mod/ban_list.html index 66471d6d..ea8183d6 100644 --- a/templates/mod/ban_list.html +++ b/templates/mod/ban_list.html @@ -75,7 +75,7 @@ {% if count > bans|count %}

- {% for i in range(0, count / config.mod.modlog_page) %} + {% for i in range(0, (count - 1) / config.mod.modlog_page) %} [{{ i + 1 }}] {% endfor %}

diff --git a/templates/mod/log.html b/templates/mod/log.html index 19924b1d..9b0979cb 100644 --- a/templates/mod/log.html +++ b/templates/mod/log.html @@ -33,7 +33,7 @@ {% if count > logs|count %}

- {% for i in range(0, count / config.mod.modlog_page) %} + {% for i in range(0, (count - 1) / config.mod.modlog_page) %} [{{ i + 1 }}] {% endfor %}

diff --git a/templates/mod/noticeboard.html b/templates/mod/noticeboard.html new file mode 100644 index 00000000..4d764d80 --- /dev/null +++ b/templates/mod/noticeboard.html @@ -0,0 +1,65 @@ +{% if mod|hasPermission(config.mod.noticeboard_post) %} +
+ {% trans 'New post' %} +
+ + + + + + + + + + + + + +
{% trans 'Name' %}{{ mod.username|e }}
{% trans 'Body' %}
+

+ +

+
+
+{% endif %} + +{% for post in noticeboard %} +
+ {% if mod|hasPermission(config.mod.noticeboard_delete) %} + + [{% trans 'delete' %}] + + {% endif %} +

+ + # + + {% if post.subject %} + {{ post.subject|e }} + {% else %} + {% trans 'no subject' %} + {% endif %} + + — by + {% if post.username %} + {{ post.username }} + {% else %} + deleted? + {% endif %} + at + {{ notice.time|date(config.post_date) }} + +

+

+ {{ post.body }} +

+
+{% endfor %} + +{% if count > noticeboard|count %} +

+ {% for i in range(0, (count - 1) / config.mod.noticeboard_page) %} + [{{ i + 1 }}] + {% endfor %} +

+{% endif %} -- cgit v1.3