From 9891dc4491df98f30ed717173efa71a4bb67bf3c Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 20 May 2015 15:00:29 +0200 Subject: [PATCH] UserController: Just show a user's name when listing users Any additional information will be shown in the detail view soon. refs #8826 --- application/controllers/UserController.php | 8 +------- application/views/scripts/user/list.phtml | 12 ----------- public/css/icinga/main-content.less | 23 ++++++++++------------ 3 files changed, 11 insertions(+), 32 deletions(-) diff --git a/application/controllers/UserController.php b/application/controllers/UserController.php index bb318c7f7..c9e9dbb0d 100644 --- a/application/controllers/UserController.php +++ b/application/controllers/UserController.php @@ -64,13 +64,7 @@ class UserController extends Controller return; } - $query = $backend->select(array( - 'user_name', - 'is_active', - 'created_at', - 'last_modified' - )); - + $query = $backend->select(array('user_name')); $filterEditor = Widget::create('filterEditor') ->setQuery($query) ->preserveParams('limit', 'sort', 'dir', 'view', 'backend') diff --git a/application/views/scripts/user/list.phtml b/application/views/scripts/user/list.phtml index 1373868fe..b550d4533 100644 --- a/application/views/scripts/user/list.phtml +++ b/application/views/scripts/user/list.phtml @@ -36,9 +36,6 @@ if (count($users) > 0): ?> translate('Username'); ?> - translate('State'); ?> - translate('Created at'); ?> - translate('Last modified'); ?> translate('Remove'); ?> @@ -48,15 +45,6 @@ if (count($users) > 0): ?> escape($user->user_name); ?> - is_active === null ? $this->translate('N/A') : ( - $user->is_active ? $this->translate('Active') : $this->translate('Inactive') - ); ?> - - created_at === null ? $this->translate('N/A') : date('d/m/Y g:i A', $user->created_at); ?> - - - last_modified === null ? $this->translate('Never') : date('d/m/Y g:i A', $user->last_modified); ?> - qlink( diff --git a/public/css/icinga/main-content.less b/public/css/icinga/main-content.less index 1a7c82f54..6c829cacb 100644 --- a/public/css/icinga/main-content.less +++ b/public/css/icinga/main-content.less @@ -205,21 +205,13 @@ table.benchmark { div.content.users { table.user-list { - th { - &.user-state, &.user-remove { - width: 6%; - padding-right: 0.5em; - text-align: right; - } - - &.user-created, &.user-modified { - width: 12%; - padding-right: 0.5em; - text-align: right; - } + th.user-remove { + width: 8em; + padding-right: 0.5em; + text-align: right; } - td.user-state, td.user-created, td.user-modified, td.user-remove { + td.user-remove { text-align: right; } } @@ -227,6 +219,11 @@ div.content.users { p { margin-top: 0; } + + a.user-add { + display: block; + margin-top: 1em; + } } div.content.groups {