aboutsummaryrefslogtreecommitdiff
path: root/data/assets/js/admin/tabs
diff options
context:
space:
mode:
authorPaul Duncan <pabs@pablotron.org>2016-05-26 02:35:34 -0400
committerPaul Duncan <pabs@pablotron.org>2016-05-26 02:35:34 -0400
commit3c5e821b3cdd1c5a144bf012bada282fffd871a2 (patch)
treefe6e12a488605481bd9c2fe18a0d59fac9030836 /data/assets/js/admin/tabs
parent9e73b3b2bd571b5f7dd752db80bc86f27d2300dd (diff)
downloadguff-3c5e821b3cdd1c5a144bf012bada282fffd871a2.tar.bz2
guff-3c5e821b3cdd1c5a144bf012bada282fffd871a2.zip
fix user-edit
Diffstat (limited to 'data/assets/js/admin/tabs')
-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],
}));