From a6104587203f1b1b448e6977066d6e649de91ae8 Mon Sep 17 00:00:00 2001 From: Michael Save Date: Sun, 6 May 2012 01:33:10 +1000 Subject: a lot more improvements --- templates/mod/users.html | 57 +++++++++++++++++++++++++++++------------------- 1 file changed, 35 insertions(+), 22 deletions(-) (limited to 'templates/mod/users.html') 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 @@ - - - - - + + + + + {% for user in users %} - + {% endfor %}
IDUsernameTypeBoardsLast action{% trans 'ID' %}{% trans 'Username' %}{% trans 'Type' %}{% trans 'Boards' %}{% trans 'Last action' %} …
{{ user.id }}{{ user.username }}{{ user.username|e }} - {% 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 %} - {# 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 == '' %} + {% trans 'none' %} + {% elseif user.boards == '*' %} + {% trans 'all boards' %} + {% 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 %} {% if mod|hasPermission(config.mod.modlog) %} {% if user.last %} {{ user.last|ago }} {% else %} - never + {% trans 'never' %} {% endif %} {% else %} – @@ -41,18 +47,25 @@ {% if mod|hasPermission(config.mod.promoteusers) and user.type < constant('ADMIN') %} - ▲ + ▲ {% endif %} {% if mod|hasPermission(config.mod.promoteusers) and user.type > constant('JANITOR') %} - ▼ + ▼ {% endif %} {% if mod|hasPermission(config.editusers) or (mod|hasPermission(config.change_password) and mod.id == user.id) %} - [edit] + [{% trans 'edit' %}] {% endif %} {% if mod|hasPermission(config.mod.create_pm) %} - [PM] + [{% trans 'PM' %}] {% endif %}
+ +{% if mod|hasPermission(config.mod.createusers) %} +

+ Create a new user +

+{% endif %} + -- cgit v1.3