From 3c5e821b3cdd1c5a144bf012bada282fffd871a2 Mon Sep 17 00:00:00 2001 From: Paul Duncan Date: Thu, 26 May 2016 02:35:34 -0400 Subject: fix user-edit --- data/assets/js/admin/tabs/users.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'data/assets/js/admin/tabs') 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}' ", ">", - "", + "", " ", "%{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], })); -- cgit v1.2.3