summaryrefslogtreecommitdiff
path: root/templates/mod/users.html
diff options
context:
space:
mode:
Diffstat (limited to 'templates/mod/users.html')
-rw-r--r--templates/mod/users.html57
1 files changed, 35 insertions, 22 deletions
diff --git a/templates/mod/users.html b/templates/mod/users.html
index 63d799d5..a0d216d3 100644
--- a/templates/mod/users.html
+++ b/templates/mod/users.html
@@ -1,39 +1,45 @@
<table class="modlog" style="width:auto">
<tr>
- <th>ID</th>
- <th>Username</th>
- <th>Type</th>
- <th>Boards</th>
- <th>Last action</th>
+ <th>{% trans 'ID' %}</th>
+ <th>{% trans 'Username' %}</th>
+ <th>{% trans 'Type' %}</th>
+ <th>{% trans 'Boards' %}</th>
+ <th>{% trans 'Last action' %}</th>
<th>&hellip;</th>
</tr>
{% for user in users %}
<tr>
<td><small>{{ user.id }}</small></td>
- <td>{{ user.username }}</td>
+ <td>{{ user.username|e }}</td>
<td>
- {% if user.type == constant('JANITOR') %}Janitor
- {% elseif user.type == constant('MOD') %}Mod
- {% elseif user.type == constant('ADMIN') %}Admin
+ {% if user.type == constant('JANITOR') %}{% trans 'Janitor' %}
+ {% elseif user.type == constant('MOD') %}{% trans 'Mod' %}
+ {% elseif user.type == constant('ADMIN') %}{% trans '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(', ') }}
+ {% 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>
<td>
{% if mod|hasPermission(config.mod.modlog) %}
{% if user.last %}
<span title="{{ user.action|e }}">{{ user.last|ago }}</span>
{% else %}
- <em>never</em>
+ <em>{% trans 'never' %}</em>
{% endif %}
{% else %}
&ndash;
@@ -41,18 +47,25 @@
</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>
+ <a style="float:left;text-decoration:none" href="?/users/{{ user.id }}/promote" title="{% trans '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>
+ <a style="float:left;text-decoration:none" href="?/users/{{ user.id }}/demote" title="{% trans '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>
+ <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 }}">[PM]</a>
+ <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 %}
+