aboutsummaryrefslogtreecommitdiff
path: root/data/assets/js/admin/tabs/users.js
diff options
context:
space:
mode:
Diffstat (limited to 'data/assets/js/admin/tabs/users.js')
-rw-r--r--data/assets/js/admin/tabs/users.js7
1 files changed, 5 insertions, 2 deletions
diff --git a/data/assets/js/admin/tabs/users.js b/data/assets/js/admin/tabs/users.js
index b74b8a1..2fff893 100644
--- a/data/assets/js/admin/tabs/users.js
+++ b/data/assets/js/admin/tabs/users.js
@@ -10,7 +10,7 @@ jQuery(function($) {
"data-user_id='%{user_id|h}' ",
"data-q='%{q|h}' ",
">",
- "<i class='fa fa-fw fa-user'></i>",
+ "<i class='fa fa-fw %{icon|h}'></i>",
" ",
"%{name|h} (%{email|h})",
@@ -89,8 +89,11 @@ jQuery(function($) {
}));
}).done(function(r) {
list.html($.map(r, function(row) {
+ var active = (row.is_active == '1');
+
return TEMPLATES.run('user', $.extend({}, row, {
- css: (row.is_active == '1') ? '' : 'list-group-item-danger',
+ icon: active ? 'fa-user' : 'fa-user-times',
+ css: active ? '' : 'list-group-item-danger',
q: [row.user_id, row.user_name, row.email, row.role_name].join(' ').toLowerCase(),
badge_css: ROLE_BADGE_CSS[row.role],
}));