diff options
| author | Michael Save <savetheinternet@tinyboard.org> | 2012-08-27 02:28:04 +1000 |
|---|---|---|
| committer | Michael Save <savetheinternet@tinyboard.org> | 2012-08-27 02:28:04 +1000 |
| commit | 6a705fd8c2324b642ac6bfc660d76cff6d5eab62 (patch) | |
| tree | 7f916bebf46f66ed55569ea1456686524aebc192 /templates/mod/users.html | |
| parent | 1dcb385e9e3791d2d3c1d049fe9b8d906539088e (diff) | |
| parent | c919e7362542117f613c2800017ae89c269a07b5 (diff) | |
Merge branch 'mod-rewrite'
Conflicts:
inc/lib/Twig/Extensions/Extension/Tinyboard.php
install.php
mod.php
stylesheets/style.css
templates/index.html
templates/page.html
templates/thread.html
Diffstat (limited to 'templates/mod/users.html')
| -rw-r--r-- | templates/mod/users.html | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/templates/mod/users.html b/templates/mod/users.html new file mode 100644 index 00000000..6ea6248f --- /dev/null +++ b/templates/mod/users.html @@ -0,0 +1,71 @@ +<table class="modlog" style="width:auto"> + <tr> + <th>{% trans 'ID' %}</th> + <th>{% trans 'Username' %}</th> + <th>{% trans 'Type' %}</th> + <th>{% trans 'Boards' %}</th> + {% if mod|hasPermission(config.mod.modlog) %} + <th>{% trans 'Last action' %}</th> + {% endif %} + <th>…</th> + </tr> + + {% for user in users %} + <tr> + <td><small>{{ user.id }}</small></td> + <td>{{ user.username|e }}</td> + <td> + {% if user.type == constant('JANITOR') %}{% trans 'Janitor' %} + {% elseif user.type == constant('MOD') %}{% trans 'Mod' %} + {% elseif user.type == constant('ADMIN') %}{% trans 'Admin' %} + {% endif %} + </td> + <td> + {% if user.boards == '' %} + <em>{% trans 'none' %}</em> + {% elseif user.boards == '*' %} + <em>{% trans 'all boards' %}</em> + {% else %} + {# 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(', ') }} + {% endif %} + </td> + {% if mod|hasPermission(config.mod.modlog) %} + <td> + {% if user.last %} + <span title="{{ user.action|e }}">{{ user.last|ago }}</span> + {% else %} + <em>{% trans 'never' %}</em> + {% endif %} + </td> + {% endif %} + <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="{% trans 'Promote' %}">▲</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="{% trans 'Demote' %}">▼</a> + {% endif %} + {% if mod|hasPermission(config.mod.editusers) or (mod|hasPermission(config.mod.change_password) and mod.id == user.id) %} + <a class="unimportant" style="margin-left:5px;float:right" href="?/users/{{ user.id }}">[{% trans 'edit' %}]</a> + {% endif %} + {% if mod|hasPermission(config.mod.create_pm) %} + <a class="unimportant" style="margin-left:5px;float:right" href="?/new_PM/{{ user.username|e }}">[{% trans 'PM' %}]</a> + {% endif %} + </td> + </tr> + {% endfor %} +</table> + +{% if mod|hasPermission(config.mod.createusers) %} + <p style="text-align:center"> + <a href="?/users/new">Create a new user</a> + </p> +{% endif %} + |
