Better view for admin [skip ci]

This commit is contained in:
James Cole 2016-04-03 10:42:46 +02:00
parent 2e05f640b8
commit bb82b0eb79
3 changed files with 30 additions and 26 deletions

View File

@ -35,16 +35,7 @@ class UserController extends Controller
$confirmAccount = env('MUST_CONFIRM_ACCOUNT', false);
// list all users:
$all = $repository->all();
// not deleted users:
$users = $all->filter(
function (User $user) {
if (!(intval($user->blocked) === 1 && is_null($user->blocked_code))) {
return $user;
}
}
);
$users = $repository->all();
// add meta stuff.
$users->each(

View File

@ -741,4 +741,9 @@ return [
'tags_group' => 'Tags group transactions together, which makes it possible to store reimbursements (in case you front money for others) and other "balancing acts" where expenses are summed up (the payments on your new TV) or where expenses and deposits are cancelling each other out (buying something with saved money). It\'s all up to you. Using tags the old-fashioned way is of course always possible.',
'tags_start' => 'Create a tag to get started or enter tags when creating new transactions.',
// administration
'administration' => 'Administration',
'user_administration' => 'User administration',
'list_all_users' => 'All users',
];

View File

@ -28,23 +28,31 @@
{{ user.created_at.formatLocalized(monthAndDayFormat) }}
{{ user.created_at.format('H:i') }}
</td>
{% if user.activated %}
<td>&nbsp;</td>
{% else %}
<td class="bg-danger"><i class="fa fa-fw fa-times"></i></td>
{% endif %}
{% if user.blocked == 1 %}
<td class="bg-danger">
{% if user.blocked_code == "" %}
<em>no reason</em>
{% else %}
{{ user.blocked_code }}
<td>
{% if user.activated %}
<small class="text-success"><i class="fa fa-fw fa-check"></i></small>
{% else %}
<small class="text-danger"><i class="fa fa-fw fa-times"></i></small>
{% endif %}
</td>
<td>
{% if user.blocked == 1 %}
<small class="text-danger"><i class="fa fa-fw fa-user-times" alt="Yes"></i></small>
{% else %}
<small class="text-success"><i class="fa fa-fw fa-smile-o" alt="No"></i></small>
{% endif %}
</td>
<td>
<small>
{% if user.blocked == 1 %}
{% if user.blocked_code == "" %}
<em>~</em>
{% else %}
{{ user.blocked_code }}
{% endif %}
{% endif %}
</td>
{% else %}
<td>&nbsp;</td>
{% endif %}
</small>
</td>
</tr>
{% endfor %}
</tbody>