UserController: Allow to add new users in case no users were found

refs #8826
This commit is contained in:
Johannes Meyer 2015-05-20 14:13:55 +02:00
parent 4a48997f47
commit 9fdcadaa97
2 changed files with 22 additions and 18 deletions

View File

@ -15,7 +15,7 @@ if (! $this->compact): ?>
</div> </div>
</div> </div>
<?php endif ?> <?php endif ?>
<div class="content"> <div class="content users">
<?php <?php
if ($backend === null) { if ($backend === null) {
@ -31,12 +31,7 @@ if (! isset($users)) {
return; return;
} }
if (count($users) === 0) { if (count($users) > 0): ?>
echo $this->translate('No users found matching the filter') . '</div>';
return;
}
?>
<table data-base-target="_next" class="action user-list"> <table data-base-target="_next" class="action user-list">
<thead> <thead>
<tr> <tr>
@ -82,6 +77,9 @@ if (count($users) === 0) {
<?php endforeach ?> <?php endforeach ?>
</tbody> </tbody>
</table> </table>
<?php else: ?>
<p><?= $this->translate('No users found matching the filter'); ?></p>
<?php endif ?>
<?php if ($extensible): ?> <?php if ($extensible): ?>
<?= $this->qlink($this->translate('Add a new user'), 'user/add', array('backend' => $backend->getName()), array( <?= $this->qlink($this->translate('Add a new user'), 'user/add', array('backend' => $backend->getName()), array(
'icon' => 'plus', 'icon' => 'plus',

View File

@ -203,6 +203,7 @@ table.benchmark {
background-color: #fbfcc5; background-color: #fbfcc5;
} }
div.content.users {
table.user-list { table.user-list {
th { th {
&.user-state, &.user-remove { &.user-state, &.user-remove {
@ -223,6 +224,11 @@ table.user-list {
} }
} }
p {
margin-top: 0;
}
}
div.content.groups { div.content.groups {
table.group-list { table.group-list {
th { th {