From 44e3dba36226451afb2a3f0954ae21bc3bb6c7ba Mon Sep 17 00:00:00 2001 From: Matthias Jentsch Date: Mon, 8 Jun 2015 16:19:03 +0200 Subject: [PATCH] Improve group and user view layout Display header and hide filter and sort widgets when there are no entries to be sorted or filtered. --- application/views/scripts/group/show.phtml | 11 ++++++----- application/views/scripts/user/show.phtml | 11 ++++++----- public/css/icinga/main-content.less | 10 ++++++---- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/application/views/scripts/group/show.phtml b/application/views/scripts/group/show.phtml index 636a449d4..8c8c91f51 100644 --- a/application/views/scripts/group/show.phtml +++ b/application/views/scripts/group/show.phtml @@ -30,8 +30,12 @@ if ($this->hasPermission('config/authentication/groups/edit') && $backend instan

escape($group->group_name); ?>

translate('Created at'); ?>: created_at === null ? '-' : $this->formatDateTime($group->created_at); ?>

-

translate('Last modified'); ?>: last_modified === null ? '-' : $this->formatDateTime($group->last_modified); ?>

+

translate('Last modified'); ?>: last_modified === null ? '-' : $this->formatDateTime($group->last_modified); ?>

+
translate('Members'); ?>
+ +
+ 0): ?> compact): ?> sortBox; ?> @@ -40,9 +44,6 @@ if ($this->hasPermission('config/authentication/groups/edit') && $backend instan compact): ?> filterEditor; ?> -
-
- 0): ?> @@ -66,7 +67,7 @@ if ($this->hasPermission('config/authentication/groups/edit') && $backend instan
-

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

+

translate('Group has no members.'); ?>

qlink($this->translate('Add a new member'), 'group/addmember', array( diff --git a/application/views/scripts/user/show.phtml b/application/views/scripts/user/show.phtml index 82f4c53f9..f4e9dee6a 100644 --- a/application/views/scripts/user/show.phtml +++ b/application/views/scripts/user/show.phtml @@ -30,8 +30,12 @@ if ($this->hasPermission('config/authentication/users/edit') && $backend instanc

escape($user->user_name); ?>

translate('State'); ?>: is_active === null ? '-' : ($user->is_active ? $this->translate('Active') : $this->translate('Inactive')); ?>

translate('Created at'); ?>: created_at === null ? '-' : $this->formatDateTime($user->created_at); ?>

-

translate('Last modified'); ?>: last_modified === null ? '-' : $this->formatDateTime($user->last_modified); ?>

+

translate('Last modified'); ?>: last_modified === null ? '-' : $this->formatDateTime($user->last_modified); ?>

+
translate('Group Memberships'); ?>
+ +
+ 0): ?> compact): ?> sortBox; ?> @@ -40,9 +44,6 @@ if ($this->hasPermission('config/authentication/users/edit') && $backend instanc compact): ?> filterEditor; ?> -
-
- 0): ?> @@ -80,7 +81,7 @@ if ($this->hasPermission('config/authentication/users/edit') && $backend instanc
-

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

+ translate('User has no group memberships.'); ?> qlink($this->translate('Create new membership'), 'user/createmembership', array( diff --git a/public/css/icinga/main-content.less b/public/css/icinga/main-content.less index 18bc03a57..06269d271 100644 --- a/public/css/icinga/main-content.less +++ b/public/css/icinga/main-content.less @@ -236,8 +236,9 @@ div.content.users { } div.controls div.user-header { - border-bottom: 2px solid @colorPetrol; - margin-bottom: 1em; + h5 { + margin-bottom: 0em; + } .user-name { display: inline-block; @@ -302,8 +303,9 @@ div.content.groups { } div.controls div.group-header { - border-bottom: 2px solid @colorPetrol; - margin-bottom: 1em; + h5 { + margin-bottom: 0em; + } .group-name { display: inline-block;