diff options
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/mod/confirm.html | 7 | ||||
| -rw-r--r-- | templates/mod/log.html | 11 | ||||
| -rw-r--r-- | templates/mod/view_ip.html | 80 |
3 files changed, 91 insertions, 7 deletions
diff --git a/templates/mod/confirm.html b/templates/mod/confirm.html new file mode 100644 index 00000000..7509ce3c --- /dev/null +++ b/templates/mod/confirm.html @@ -0,0 +1,7 @@ +<p style="text-align:center;font-size:1.1em"> + Are you sure you want to do that? <a href="?/{{ request }}">Click to proceed to ?/{{ request }}</a>. +</p> +<p class="unimportant" style="text-align:center"> + You are seeing this message because we were unable to serve a confirmation dialog, probably due to Javascript being disabled. +</p> + diff --git a/templates/mod/log.html b/templates/mod/log.html new file mode 100644 index 00000000..2aa0ea0a --- /dev/null +++ b/templates/mod/log.html @@ -0,0 +1,11 @@ +<table class="modlog"> + <tr> + <th> + + </th> + </tr> + {% for log in logs %} + + {% endfor %} +</table> + diff --git a/templates/mod/view_ip.html b/templates/mod/view_ip.html index a9676dd7..3bc9654c 100644 --- a/templates/mod/view_ip.html +++ b/templates/mod/view_ip.html @@ -9,9 +9,73 @@ </fieldset> {% endfor %} -{% set redirect = '?/IP/' ~ ip %} +{% if mod|hasPermission(config.mod.view_notes) %} + <fieldset> + <legend> + {{ notes|count }} note{% if notes|count != 1 %}s{% endif %} on record + </legend> + + {% if notes|count > 0 %} + <table class="modlog"> + <tr> + <th>Staff</th> + <th>Note</th> + <th>Date</th> + {% if mod|hasPermission(config.mod.remove_notes) %} + <th>Actions</th> + {% endif %} + </tr> + {% for note in notes %} + <tr> + <td class="minimal"> + {% if note.username %} + <a href="?/new_PM/{{ note.username }}">{{ note.username }}</a> + {% else %} + <em>deleted?</em> + {% endif %} + </td> + <td> + {{ note.body }} + </td> + <td class="minimal"> + {{ note.time|date(config.post_date) }} + </td> + {% if mod|hasPermission(config.mod.remove_notes) %} + <td class="minimal"> + <a href="?/IP/{{ ip }}/remove_note/{{ note.id }}"><small>[remove]</small></a> + </td> + {% endif %} + </tr> + {% endfor %} + </table> + {% endif %} + + {% if mod|hasPermission(config.mod.create_notes) %} + <form action="" method="post" style="margin:0"> + <table> + <tr> + <th>Staff</th> + <td>{{ mod.username }}</td> + </tr> + <tr> + <th> + <label for="note">Note</label> + </th> + <td> + <textarea id="note" name="note" rows="5" cols="30"></textarea> + </td> + </tr> + <tr> + <td></td> + <td><input type="submit" value="New note"></td> + </tr> + </table> + </form> + {% endif %} + </fieldset> +{% endif %} -{% if bans|count > 0 %} +{% if bans|count > 0 and mod|hasPermission(config.mod.view_ban) %} <fieldset> <legend>Ban{% if bans|count != 1 %}s{% endif %} on record</legend> @@ -84,8 +148,10 @@ </fieldset> {% endif %} -<fieldset> - <legend>New ban</legend> - {% include 'mod/ban_form.html' %} -</fieldset> - +{% if mod|hasPermission(config.mod.ban) %} + <fieldset> + <legend>New ban</legend> + {% set redirect = '?/IP/' ~ ip %} + {% include 'mod/ban_form.html' %} + </fieldset> +{% endif %} |
