Skip to content

Commit

Permalink
Revert "Improve group and user view layout"
Browse files Browse the repository at this point in the history
This reverts commit 44e3dba.
Reason:
* Controls are controls, not content
* Controls must still be shown in case of a non-matching filter
  • Loading branch information
Johannes Meyer committed Jun 9, 2015
1 parent 44e3dba commit 17fa0d3
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 18 deletions.
11 changes: 5 additions & 6 deletions application/views/scripts/group/show.phtml
Expand Up @@ -30,12 +30,8 @@ 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>
<h5><?= $this->translate('Members'); ?></h5>
<p class="group-modified"><strong><?= $this->translate('Last modified'); ?>:</strong> <?= $group->last_modified === null ? '-' : $this->formatDateTime($group->last_modified); ?></p>
</div>
</div>
<div class="content members" data-base-target="_next">
<?php if (count($members) > 0): ?>
<?php if (! $this->compact): ?>
<?= $this->sortBox; ?>
<?php endif ?>
Expand All @@ -44,6 +40,9 @@ 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>
Expand All @@ -67,7 +66,7 @@ if ($this->hasPermission('config/authentication/groups/edit') && $backend instan
</tbody>
</table>
<?php else: ?>
<p><?= $this->translate('Group has no members.'); ?></p>
<p><?= $this->translate('No group member found matching the filter'); ?></p>
<?php endif ?>
<?php if ($extensible): ?>
<?= $this->qlink($this->translate('Add a new member'), 'group/addmember', array(
Expand Down
11 changes: 5 additions & 6 deletions application/views/scripts/user/show.phtml
Expand Up @@ -30,12 +30,8 @@ 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>
<h5><?= $this->translate('Group Memberships'); ?></h5>
<p class="user-modified"><strong><?= $this->translate('Last modified'); ?>:</strong> <?= $user->last_modified === null ? '-' : $this->formatDateTime($user->last_modified); ?></p>
</div>
</div>
<div class="content memberships" data-base-target="_next">
<?php if (count($memberships) > 0): ?>
<?php if (! $this->compact): ?>
<?= $this->sortBox; ?>
<?php endif ?>
Expand All @@ -44,6 +40,9 @@ 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>
Expand Down Expand Up @@ -81,7 +80,7 @@ if ($this->hasPermission('config/authentication/users/edit') && $backend instanc
</tbody>
</table>
<?php else: ?>
<?= $this->translate('User has no group memberships.'); ?>
<p><?= $this->translate('No memberships found matching the filter'); ?></p>
<?php endif ?>
<?php if ($showCreateMembershipLink): ?>
<?= $this->qlink($this->translate('Create new membership'), 'user/createmembership', array(
Expand Down
10 changes: 4 additions & 6 deletions public/css/icinga/main-content.less
Expand Up @@ -236,9 +236,8 @@ div.content.users {
}

div.controls div.user-header {
h5 {
margin-bottom: 0em;
}
border-bottom: 2px solid @colorPetrol;
margin-bottom: 1em;

.user-name {
display: inline-block;
Expand Down Expand Up @@ -303,9 +302,8 @@ div.content.groups {
}

div.controls div.group-header {
h5 {
margin-bottom: 0em;
}
border-bottom: 2px solid @colorPetrol;
margin-bottom: 1em;

.group-name {
display: inline-block;
Expand Down

0 comments on commit 17fa0d3

Please sign in to comment.