2021-09-02 16:34:25 +00:00
|
|
|
<?= $this->extend('_layout') ?>
|
2020-07-10 12:20:25 +00:00
|
|
|
|
2020-07-16 10:08:23 +00:00
|
|
|
<?= $this->section('title') ?>
|
2020-10-02 15:38:16 +00:00
|
|
|
<?= lang('User.all_users') ?>
|
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
|
|
|
<?= $this->section('pageTitle') ?>
|
2020-08-04 11:25:22 +00:00
|
|
|
<?= lang('User.all_users') ?> (<?= count($users) ?>)
|
2020-07-16 10:08:23 +00:00
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
2020-10-02 15:38:16 +00:00
|
|
|
<?= $this->section('headerRight') ?>
|
2021-09-20 15:45:38 +00:00
|
|
|
<Button uri="<?= route_to('user-create') ?>" variant="accent" iconLeft="user-add"><?= lang('User.create') ?></Button>
|
2020-10-02 15:38:16 +00:00
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
2020-07-16 10:08:23 +00:00
|
|
|
|
2020-07-10 12:20:25 +00:00
|
|
|
<?= $this->section('content') ?>
|
|
|
|
|
2020-10-02 15:38:16 +00:00
|
|
|
<?= data_table(
|
|
|
|
[
|
|
|
|
[
|
|
|
|
'header' => lang('User.list.user'),
|
|
|
|
'cell' => function ($user) {
|
|
|
|
return '<div class="flex flex-col">' .
|
|
|
|
$user->username .
|
|
|
|
'<span class="text-sm text-gray-600">' .
|
|
|
|
$user->email .
|
|
|
|
'</span></div>';
|
|
|
|
},
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'header' => lang('User.list.roles'),
|
|
|
|
'cell' => function ($user) {
|
|
|
|
return implode(',', $user->roles) .
|
2021-09-20 15:45:38 +00:00
|
|
|
'<IconButton uri="' . route_to('user-edit', $user->id) . '" glyph="edit" variant="info">' . lang('User.edit_roles', [
|
|
|
|
'username' => $user->username,
|
|
|
|
]) . '</IconButton>';
|
2020-10-02 15:38:16 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'header' => lang('User.list.banned'),
|
|
|
|
'cell' => function ($user) {
|
|
|
|
return $user->isBanned()
|
|
|
|
? lang('Common.yes')
|
|
|
|
: lang('Common.no');
|
|
|
|
},
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'header' => lang('Common.actions'),
|
|
|
|
'cell' => function ($user) {
|
2021-09-20 15:45:38 +00:00
|
|
|
return '<Button uri="' . route_to('user-force_pass_reset', $user->id) . '" variant="secondary" size="small">' . lang('User.forcePassReset') . '</Button>' .
|
|
|
|
'<Button uri="' . route_to($user->isBanned() ? 'user-unban' : 'user-ban', $user->id) . '" variant="warning" size="small">' . lang('User.' . ($user->isBanned() ? 'unban' : 'ban')) . '</Button>' .
|
|
|
|
'<Button uri="' . route_to('user-delete', $user->id) . '" variant="danger" size="small">' . lang('User.delete') . '</Button>';
|
2020-10-02 15:38:16 +00:00
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
2021-05-06 14:00:48 +00:00
|
|
|
$users,
|
2020-10-02 15:38:16 +00:00
|
|
|
) ?>
|
2020-07-10 12:20:25 +00:00
|
|
|
|
2020-10-22 17:41:59 +00:00
|
|
|
<?= $this->endSection() ?>
|