diff options
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/mod/ban_list.html | 2 | ||||
| -rw-r--r-- | templates/mod/log.html | 2 | ||||
| -rw-r--r-- | templates/mod/noticeboard.html | 65 |
3 files changed, 67 insertions, 2 deletions
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 %} <p class="unimportant" style="text-align:center;word-wrap:break-word"> - {% for i in range(0, count / config.mod.modlog_page) %} + {% for i in range(0, (count - 1) / config.mod.modlog_page) %} <a href="?/bans/{{ i + 1 }}">[{{ i + 1 }}]</a> {% endfor %} </p> 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 %} <p class="unimportant" style="text-align:center;word-wrap:break-word"> - {% for i in range(0, count / config.mod.modlog_page) %} + {% for i in range(0, (count - 1) / config.mod.modlog_page) %} <a href="?/log/{{ i + 1 }}">[{{ i + 1 }}]</a> {% endfor %} </p> 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) %} + <fieldset> + <legend>{% trans 'New post' %}</legend> + <form style="margin:0" action="" method="post"> + <table> + <tr> + <th>{% trans 'Name' %}</th> + <td>{{ mod.username|e }}</td> + </tr> + <tr> + <th><label for="subject">{% trans 'Subject' %}</label></th> + <td><input type="text" size="55" name="subject" id="subject" /></td> + </tr> + <tr> + <th>{% trans 'Body' %}</th> + <td><textarea name="body" style="width:100%;height:100px"></textarea></td> + </tr> + </table> + <p style="text-align:center"> + <input type="submit" value="{% trans 'Post to noticeboard' %}" /> + </p> + </form> + </fieldset> +{% endif %} + +{% for post in noticeboard %} + <div class="ban"> + {% if mod|hasPermission(config.mod.noticeboard_delete) %} + <span style="float:right;padding:2px"> + <a class="unimportant" href="?/noticeboard/delete/{{ post.id }}">[{% trans 'delete' %}]</a> + </span> + {% endif %} + <h2 id="{{ post.id }}"> + <small class="unimportant"> + <a href="#{{ post.id }}">#</a> + </small> + {% if post.subject %} + {{ post.subject|e }} + {% else %} + <em>{% trans 'no subject' %}</em> + {% endif %} + <small class="unimportant"> + — by + {% if post.username %} + {{ post.username }} + {% else %} + <em>deleted?</em> + {% endif %} + at + {{ notice.time|date(config.post_date) }} + </small> + </h2> + <p> + {{ post.body }} + </p> + </div> +{% endfor %} + +{% if count > noticeboard|count %} + <p class="unimportant" style="text-align:center;word-wrap:break-word"> + {% for i in range(0, (count - 1) / config.mod.noticeboard_page) %} + <a href="?/noticeboard/{{ i + 1 }}">[{{ i + 1 }}]</a> + {% endfor %} + </p> +{% endif %} |
