group/show.phtml: Fix coding style, link targets, css, etc

refs #10367
This commit is contained in:
Johannes Meyer 2015-10-15 15:47:38 +02:00
parent 32955dea50
commit 0ee73f2560
3 changed files with 69 additions and 100 deletions

View File

@ -134,7 +134,7 @@ class GroupController extends AuthBackendController
$removeForm->addElement('button', 'btn_submit', array(
'escape' => false,
'type' => 'submit',
'class' => 'link-like spinner',
'class' => 'link-button spinner',
'value' => 'btn_submit',
'decorators' => array('ViewHelper'),
'label' => $this->view->icon('trash'),

View File

@ -23,10 +23,10 @@ if ($this->hasPermission('config/authentication/groups/edit') && $backend instan
}
?>
<div class="controls">
<?php if (! $this->compact): ?>
<div class="controls separated dont-print">
<?php if (! $this->compact): ?>
<?= $tabs; ?>
<?php endif ?>
<?php endif ?>
<h2 class="clearfix"><?= $this->escape($group->group_name) ?><span class="pull-right"><?= $editLink ?></span></h2>
<table class="name-value-table">
<tr>
@ -38,50 +38,50 @@ if ($this->hasPermission('config/authentication/groups/edit') && $backend instan
<td><?= $group->last_modified === null ? '-' : $this->formatDateTime($group->last_modified); ?></td>
</tr>
</table>
<h2><?= $this->translate('Members'); ?></h2>
<?php if (! $this->compact): ?>
<?= $this->sortBox; ?>
<?php endif ?>
<h2><?= $this->translate('Members'); ?></h2>
<div class="grid">
<?= $this->limiter; ?>
<?= $this->paginator; ?>
<?php if (! $this->compact): ?>
<?= $this->sortBox; ?>
</div>
<?= $this->filterEditor; ?>
<?php endif ?>
</div>
<div class="content members" data-base-target="_next">
<div class="content">
<?php if ($extensible): ?>
<?= $this->qlink(
$this->translate('Add User to Group') ,
$this->translate('Add New Member'),
'group/addmember',
null,
array(
'class' => 'button-link',
'data-base-target' => '_next',
'backend' => $backend->getName(),
'group' => $group->group_name
),
array(
'icon' => 'plus',
'title' => $this->translate('Add user to group')
'class' => 'button-link'
)
) ?>
<?php endif ?>
<?php
<?php if (! $members->hasResult()): ?>
<p><?= $this->translate('No group member found matching the filter'); ?></p>
</div>
<?php return; endif ?>
$firstRow = true;
foreach ($members as $member): ?>
<?php if ($firstRow): ?>
<?php $firstRow = false; ?>
<table data-base-target="_next" class="action-table listing-table">
<thead>
<tr>
<th class="member-name"><?= $this->translate('Username'); ?></th>
<th><?= $this->translate('Username'); ?></th>
<?php if (isset($removeForm)): ?>
<th class="member-remove"><?= $this->translate('Remove'); ?></th>
<th><?= $this->translate('Remove'); ?></th>
<?php endif ?>
</tr>
</thead>
<tbody>
<?php endif ?>
<?php foreach ($members as $member): ?>
<tr>
<td class="member-name">
<td>
<?php if (
$this->hasPermission('config/authentication/users/show')
&& ($userBackend = $backend->getUserBackendName($member->user_name)) !== null
@ -102,11 +102,7 @@ foreach ($members as $member): ?>
</td>
<?php endif ?>
</tr>
<?php endforeach ?>
<?php if ($members->hasResult()): ?>
<?php endforeach ?>
</tbody>
</table>
<?php else: ?>
<p><?= $this->translate('No group member found matching the filter'); ?></p>
<?php endif ?>
</div>

View File

@ -256,33 +256,6 @@ div.content.groups {
}
}
div.content.members {
table.member-list {
th.member-remove {
width: 8em;
padding-right: 0.5em;
text-align: right;
}
td.member-remove {
text-align: right;
form button.link-like {
color: inherit;
}
}
}
p {
margin-top: 0;
}
a.member-add {
display: block;
margin-top: 1em;
}
}
form.backend-selection {
float: right;