Improve group and user view layout

Display header and hide filter and sort widgets when there are no entries to be sorted or filtered.
This commit is contained in:
Matthias Jentsch 2015-06-08 16:19:03 +02:00
parent 91cee3a957
commit 44e3dba362
3 changed files with 18 additions and 14 deletions

View File

@ -30,8 +30,12 @@ if ($this->hasPermission('config/authentication/groups/edit') && $backend instan
<div class="group-header">
<p class="group-name"><strong><?= $this->escape($group->group_name); ?></strong></p> <?= $editLink; ?>
<p class="group-created"><strong><?= $this->translate('Created at'); ?>:</strong> <?= $group->created_at === null ? '-' : $this->formatDateTime($group->created_at); ?></p>
<p class="group-modified"><strong><?= $this->translate('Last modified'); ?>:</strong> <?= $group->last_modified === null ? '-' : $this->formatDateTime($group->last_modified); ?></p>
<p class="group-modified"><strong><?= $this->translate('Last modified'); ?>:</strong> <?= $group->last_modified === null ? '-' : $this->formatDateTime($group->last_modified); ?></p>
<h5><?= $this->translate('Members'); ?></h5>
</div>
</div>
<div class="content members" data-base-target="_next">
<?php if (count($members) > 0): ?>
<?php if (! $this->compact): ?>
<?= $this->sortBox; ?>
<?php endif ?>
@ -40,9 +44,6 @@ if ($this->hasPermission('config/authentication/groups/edit') && $backend instan
<?php if (! $this->compact): ?>
<?= $this->filterEditor; ?>
<?php endif ?>
</div>
<div class="content members" data-base-target="_next">
<?php if (count($members) > 0): ?>
<table data-base-target="_next" class="action member-list">
<thead>
<tr>
@ -66,7 +67,7 @@ if ($this->hasPermission('config/authentication/groups/edit') && $backend instan
</tbody>
</table>
<?php else: ?>
<p><?= $this->translate('No group member found matching the filter'); ?></p>
<p><?= $this->translate('Group has no members.'); ?></p>
<?php endif ?>
<?php if ($extensible): ?>
<?= $this->qlink($this->translate('Add a new member'), 'group/addmember', array(

View File

@ -30,8 +30,12 @@ if ($this->hasPermission('config/authentication/users/edit') && $backend instanc
<p class="user-name"><strong><?= $this->escape($user->user_name); ?></strong></p> <?= $editLink; ?>
<p class="user-state"><strong><?= $this->translate('State'); ?>:</strong> <?= $user->is_active === null ? '-' : ($user->is_active ? $this->translate('Active') : $this->translate('Inactive')); ?></p>
<p class="user-created"><strong><?= $this->translate('Created at'); ?>:</strong> <?= $user->created_at === null ? '-' : $this->formatDateTime($user->created_at); ?></p>
<p class="user-modified"><strong><?= $this->translate('Last modified'); ?>:</strong> <?= $user->last_modified === null ? '-' : $this->formatDateTime($user->last_modified); ?></p>
<p class="user-modified"><strong><?= $this->translate('Last modified'); ?>:</strong> <?= $user->last_modified === null ? '-' : $this->formatDateTime($user->last_modified); ?></p>
<h5><?= $this->translate('Group Memberships'); ?></h5>
</div>
</div>
<div class="content memberships" data-base-target="_next">
<?php if (count($memberships) > 0): ?>
<?php if (! $this->compact): ?>
<?= $this->sortBox; ?>
<?php endif ?>
@ -40,9 +44,6 @@ if ($this->hasPermission('config/authentication/users/edit') && $backend instanc
<?php if (! $this->compact): ?>
<?= $this->filterEditor; ?>
<?php endif ?>
</div>
<div class="content memberships" data-base-target="_next">
<?php if (count($memberships) > 0): ?>
<table data-base-target="_next" class="action membership-list">
<thead>
<tr>
@ -80,7 +81,7 @@ if ($this->hasPermission('config/authentication/users/edit') && $backend instanc
</tbody>
</table>
<?php else: ?>
<p><?= $this->translate('No memberships found matching the filter'); ?></p>
<?= $this->translate('User has no group memberships.'); ?>
<?php endif ?>
<?php if ($showCreateMembershipLink): ?>
<?= $this->qlink($this->translate('Create new membership'), 'user/createmembership', array(

View File

@ -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;