From 9fdcadaa97620f12d72a35ba06aa96dd4be43617 Mon Sep 17 00:00:00 2001 From: Johannes Meyer Date: Wed, 20 May 2015 14:13:55 +0200 Subject: [PATCH] UserController: Allow to add new users in case no users were found refs #8826 --- application/views/scripts/user/list.phtml | 12 ++++------ public/css/icinga/main-content.less | 28 ++++++++++++++--------- 2 files changed, 22 insertions(+), 18 deletions(-) diff --git a/application/views/scripts/user/list.phtml b/application/views/scripts/user/list.phtml index 5824f7681..1373868fe 100644 --- a/application/views/scripts/user/list.phtml +++ b/application/views/scripts/user/list.phtml @@ -15,7 +15,7 @@ if (! $this->compact): ?> -
+
translate('No users found matching the filter') . '
'; - return; -} -?> - +if (count($users) > 0): ?> @@ -82,6 +77,9 @@ if (count($users) === 0) {
+ +

translate('No users found matching the filter'); ?>

+ qlink($this->translate('Add a new user'), 'user/add', array('backend' => $backend->getName()), array( 'icon' => 'plus', diff --git a/public/css/icinga/main-content.less b/public/css/icinga/main-content.less index 032e7df24..1a7c82f54 100644 --- a/public/css/icinga/main-content.less +++ b/public/css/icinga/main-content.less @@ -203,23 +203,29 @@ table.benchmark { background-color: #fbfcc5; } -table.user-list { - th { - &.user-state, &.user-remove { - width: 6%; - padding-right: 0.5em; - text-align: right; +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; + } } - &.user-created, &.user-modified { - width: 12%; - padding-right: 0.5em; + td.user-state, td.user-created, td.user-modified, td.user-remove { text-align: right; } } - td.user-state, td.user-created, td.user-modified, td.user-remove { - text-align: right; + p { + margin-top: 0; } }