summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorMichael Save <savetheinternet@tinyboard.org>2012-04-13 22:00:40 +1000
committerMichael Save <savetheinternet@tinyboard.org>2012-04-13 22:00:40 +1000
commite49ece459e2ee225ba677f8e0758a38a98b930f5 (patch)
tree3e40bf21f531294fca7a42e44ef4855b33cfd277 /templates
parent761cb4feab1a052e2e611a1d09d0a3513e011c06 (diff)
new PM
Diffstat (limited to 'templates')
-rw-r--r--templates/mod/new_pm.html22
-rw-r--r--templates/mod/users.html54
2 files changed, 76 insertions, 0 deletions
diff --git a/templates/mod/new_pm.html b/templates/mod/new_pm.html
new file mode 100644
index 00000000..d694bc26
--- /dev/null
+++ b/templates/mod/new_pm.html
@@ -0,0 +1,22 @@
+{#{% if id == mod.id %}
+ {% set username = 'me' %}
+{% endif %}#}
+
+<form action="" method="post">
+ <table>
+ <tr>
+ <th>To</th>
+ {% if mod|hasPermission(config.mod.editusers) %}
+ <td><a href="?/users/{{ id }}">{{ username|e }}</a></td>
+ {% else %}
+ <td>{{ username|e }}</td>
+ {% endif %}
+ </tr>
+ <tr>
+ <th>Message</th>
+ <td><textarea name="message" rows="10" cols="40"></textarea></td>
+ </tr>
+ </table>
+
+ <p style="text-align:center"><input type="submit" value="Send message"></p>
+</form>
diff --git a/templates/mod/users.html b/templates/mod/users.html
new file mode 100644
index 00000000..aeacc8b5
--- /dev/null
+++ b/templates/mod/users.html
@@ -0,0 +1,54 @@
+<table class="modlog" style="width:auto">
+ <tr>
+ <th>ID</th>
+ <th>Username</th>
+ <th>Type</th>
+ <th>Boards</th>
+ <th>Last action</th>
+ <th>&hellip;</th>
+ </tr>
+
+ {% for user in users %}
+ <tr>
+ <td><small>{{ user.id }}</small></td>
+ <td>{{ user.username }}</td>
+ <td>
+ {% if user.type == constant('JANITOR') %}Janitor
+ {% elseif user.type == constant('MOD') %}Mod
+ {% elseif user.type == constant('ADMIN') %}Admin
+ {% endif %}
+ </td>
+ <td>
+ {# This is really messy, but IMO it beats doing it in PHP. #}
+ {% set boards = user.boards|split(',') %}
+ {% set _boards = [] %}
+ {% for board in boards %}
+ {% set _boards = _boards|push(board == '*' ? '*' : config.board_abbreviation|sprintf(board)) %}
+ {% endfor %}
+ {% set _boards = _boards|sort %}
+ {{ _boards|join(', ') }}
+ </td>
+ <td>
+ {% if mod|hasPermission(config.mod.modlog) %}
+ <span title="{{ user.action|e }}">{{ user.last|ago }}</span>
+ {% else %}
+ &ndash;
+ {% endif %}
+ </td>
+ <td>
+ {% if mod|hasPermission(config.mod.promoteusers) and user.type < constant('ADMIN') %}
+ <a style="float:left;text-decoration:none" href="?/users/{{ user.id }}/promote" title="Promote">&#9650;</a>
+ {% endif %}
+ {% if mod|hasPermission(config.mod.promoteusers) and user.type > constant('JANITOR') %}
+ <a style="float:left;text-decoration:none" href="?/users/{{ user.id }}/demote" title="Demote">&#9660;</a>
+ {% endif %}
+ {% if mod|hasPermission(config.editusers) or (mod|hasPermission(config.change_password) and mod.id == user.id) %}
+ <a class="unimportant" style="margin-left:5px;float:right" href="?/users/{{ user.id }}">[edit]</a>
+ {% endif %}
+ {% if mod|hasPermission(config.mod.create_pm) %}
+ <a class="unimportant" style="margin-left:5px;float:right" href="?/new_PM/{{ user.username }}">[PM]</a>
+ {% endif %}
+ </td>
+ </tr>
+ {% endfor %}
+</table>