diff --git a/public_html/css/user-list.css b/public_html/css/user-list.css index 5e91471e..ddfdf96f 100644 --- a/public_html/css/user-list.css +++ b/public_html/css/user-list.css @@ -39,12 +39,14 @@ #user-list .user img { vertical-align: top; - margin-right: 1em; display: block; } -#user-list .user>a { - display: block; +#user-list .user .avatar { float: left; + margin-right: 1em; +} +#user-list .user .avatar a { + display: block; } #user-list .user .details { float: left; diff --git a/public_html/js/Presenters/UserListPresenter.js b/public_html/js/Presenters/UserListPresenter.js index f4e531c1..4d05fe85 100644 --- a/public_html/js/Presenters/UserListPresenter.js +++ b/public_html/js/Presenters/UserListPresenter.js @@ -13,11 +13,14 @@ App.Presenters.UserListPresenter = function( var $el = jQuery('#content'); var templates = {}; var params; + var privileges = {}; function init(params, loaded) { topNavigationPresenter.select('users'); topNavigationPresenter.changeTitle('Users'); + privileges.canViewUsers = auth.hasPrivilege(auth.privileges.viewUsers); + promise.wait( util.promiseTemplate('user-list'), util.promiseTemplate('user-list-item')) @@ -60,7 +63,7 @@ App.Presenters.UserListPresenter = function( } function render() { - $el.html(templates.list()); + $el.html(templates.list(privileges)); } function updateActiveOrder(activeOrder) { @@ -71,10 +74,10 @@ App.Presenters.UserListPresenter = function( function renderUsers($page, users) { var $target = $page.find('.users'); _.each(users, function(user) { - var $item = jQuery('