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( $removeForm->addElement('button', 'btn_submit', array(
'escape' => false, 'escape' => false,
'type' => 'submit', 'type' => 'submit',
'class' => 'link-like spinner', 'class' => 'link-button spinner',
'value' => 'btn_submit', 'value' => 'btn_submit',
'decorators' => array('ViewHelper'), 'decorators' => array('ViewHelper'),
'label' => $this->view->icon('trash'), 'label' => $this->view->icon('trash'),

View File

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