From eea4e42609e319b38f14bca9f31cc3327ffaf175 Mon Sep 17 00:00:00 2001 From: Michael Foster Date: Mon, 9 Sep 2013 01:33:51 +1000 Subject: Add ability to create custom user/permissions groups --- templates/mod/config-editor.html | 9 +++++---- templates/mod/user.html | 20 +++++++------------- templates/mod/users.html | 11 ++++++----- 3 files changed, 18 insertions(+), 22 deletions(-) (limited to 'templates/mod') diff --git a/templates/mod/config-editor.html b/templates/mod/config-editor.html index a43f8cf7..4f4cba93 100644 --- a/templates/mod/config-editor.html +++ b/templates/mod/config-editor.html @@ -42,10 +42,11 @@ {% elseif var.permissions %} {% elseif var.type == 'integer' %} diff --git a/templates/mod/user.html b/templates/mod/user.html index 1bb297af..89240824 100644 --- a/templates/mod/user.html +++ b/templates/mod/user.html @@ -28,21 +28,15 @@ {% if new %} - {% trans 'Class' %} + {% trans 'Group' %} diff --git a/templates/mod/users.html b/templates/mod/users.html index fbd43b32..984c48e1 100644 --- a/templates/mod/users.html +++ b/templates/mod/users.html @@ -15,9 +15,10 @@ {{ user.id }} {{ user.username|e }} - {% if user.type == constant('JANITOR') %}{% trans 'Janitor' %} - {% elseif user.type == constant('MOD') %}{% trans 'Mod' %} - {% elseif user.type == constant('ADMIN') %}{% trans 'Admin' %} + {% if config.mod.groups[user.type] %} + {{ config.mod.groups[user.type] }} + {% else %} + {% trans 'Unknown' %} ({{ user.type }}) {% endif %} @@ -46,10 +47,10 @@ {% endif %} - {% if mod|hasPermission(config.mod.promoteusers) and user.type < constant('ADMIN') %} + {% if mod|hasPermission(config.mod.promoteusers) and user.type < constant(config.mod.groups[0:-1]|last) %} ▲ {% endif %} - {% if mod|hasPermission(config.mod.promoteusers) and user.type > constant('JANITOR') %} + {% if mod|hasPermission(config.mod.promoteusers) and user.type > constant(config.mod.groups|first) %} ▼ {% endif %} {% if mod|hasPermission(config.mod.modlog) %} -- cgit v1.3