UserController: Just show a user's name when listing users

Any additional information will be shown in the detail view soon.

refs #8826
This commit is contained in:
Johannes Meyer 2015-05-20 15:00:29 +02:00
parent 9fdcadaa97
commit 9891dc4491
3 changed files with 11 additions and 32 deletions

View File

@ -64,13 +64,7 @@ class UserController extends Controller
return; return;
} }
$query = $backend->select(array( $query = $backend->select(array('user_name'));
'user_name',
'is_active',
'created_at',
'last_modified'
));
$filterEditor = Widget::create('filterEditor') $filterEditor = Widget::create('filterEditor')
->setQuery($query) ->setQuery($query)
->preserveParams('limit', 'sort', 'dir', 'view', 'backend') ->preserveParams('limit', 'sort', 'dir', 'view', 'backend')

View File

@ -36,9 +36,6 @@ if (count($users) > 0): ?>
<thead> <thead>
<tr> <tr>
<th class="user-name"><?= $this->translate('Username'); ?></th> <th class="user-name"><?= $this->translate('Username'); ?></th>
<th class="user-state"><?= $this->translate('State'); ?></th>
<th class="user-created"><?= $this->translate('Created at'); ?></th>
<th class="user-modified"><?= $this->translate('Last modified'); ?></th>
<?php if ($reducible): ?> <?php if ($reducible): ?>
<th class="user-remove"><?= $this->translate('Remove'); ?></th> <th class="user-remove"><?= $this->translate('Remove'); ?></th>
<?php endif ?> <?php endif ?>
@ -48,15 +45,6 @@ if (count($users) > 0): ?>
<?php foreach ($users as $user): ?> <?php foreach ($users as $user): ?>
<tr> <tr>
<td clas="user-name"><?= $this->escape($user->user_name); ?></td> <td clas="user-name"><?= $this->escape($user->user_name); ?></td>
<td class="user-state"><?= $user->is_active === null ? $this->translate('N/A') : (
$user->is_active ? $this->translate('Active') : $this->translate('Inactive')
); ?></td>
<td class="user-created">
<?= $user->created_at === null ? $this->translate('N/A') : date('d/m/Y g:i A', $user->created_at); ?>
</td>
<td class="user-modified">
<?= $user->last_modified === null ? $this->translate('Never') : date('d/m/Y g:i A', $user->last_modified); ?>
</td>
<?php if ($reducible): ?> <?php if ($reducible): ?>
<td class="user-remove"> <td class="user-remove">
<?= $this->qlink( <?= $this->qlink(

View File

@ -205,21 +205,13 @@ table.benchmark {
div.content.users { div.content.users {
table.user-list { table.user-list {
th { th.user-remove {
&.user-state, &.user-remove { width: 8em;
width: 6%;
padding-right: 0.5em; padding-right: 0.5em;
text-align: right; text-align: right;
} }
&.user-created, &.user-modified { td.user-remove {
width: 12%;
padding-right: 0.5em;
text-align: right;
}
}
td.user-state, td.user-created, td.user-modified, td.user-remove {
text-align: right; text-align: right;
} }
} }
@ -227,6 +219,11 @@ div.content.users {
p { p {
margin-top: 0; margin-top: 0;
} }
a.user-add {
display: block;
margin-top: 1em;
}
} }
div.content.groups { div.content.groups {