2020-07-10 12:20:25 +00:00
|
|
|
<?= $this->extend('admin/_layout') ?>
|
|
|
|
|
2020-07-16 10:08:23 +00:00
|
|
|
<?= $this->section('title') ?>
|
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-07-10 12:20:25 +00:00
|
|
|
<?= $this->section('content') ?>
|
|
|
|
|
2020-07-16 10:08:23 +00:00
|
|
|
<table class="table-auto">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th class="px-4 py-2">Username</th>
|
|
|
|
<th class="px-4 py-2">Email</th>
|
2020-07-31 16:05:10 +00:00
|
|
|
<th class="px-4 py-2">Roles</th>
|
2020-07-16 10:08:23 +00:00
|
|
|
<th class="px-4 py-2">Banned?</th>
|
|
|
|
<th class="px-4 py-2">Actions</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
2020-08-04 11:25:22 +00:00
|
|
|
<?php foreach ($users as $user): ?>
|
2020-07-16 10:08:23 +00:00
|
|
|
<tr>
|
|
|
|
<td class="px-4 py-2 border"><?= $user->username ?></td>
|
|
|
|
<td class="px-4 py-2 border"><?= $user->email ?></td>
|
2020-07-31 16:05:10 +00:00
|
|
|
<td class="px-4 py-2 border">
|
|
|
|
[<?= implode(', ', $user->roles) ?>]
|
|
|
|
<a class="inline-flex p-2 mr-2 text-teal-700 bg-teal-100 rounded-full shadow-xs hover:bg-teal-200" href="<?= route_to(
|
2020-08-14 18:27:57 +00:00
|
|
|
'user-edit',
|
2020-07-31 16:05:10 +00:00
|
|
|
$user->id
|
|
|
|
) ?>" data-toggle="tooltip" data-placement="bottom"
|
|
|
|
title="<?= lang('User.edit_roles', [
|
|
|
|
'username' => $user->username,
|
|
|
|
]) ?>">
|
|
|
|
<?= icon('edit') ?>
|
|
|
|
</a>
|
|
|
|
</td>
|
2020-07-16 10:08:23 +00:00
|
|
|
<td class="px-4 py-2 border"><?= $user->isBanned()
|
|
|
|
? 'Yes'
|
|
|
|
: 'No' ?></td>
|
|
|
|
<td class="px-4 py-2 border">
|
2020-07-31 16:05:10 +00:00
|
|
|
<a class="inline-flex px-2 py-1 mb-2 text-sm text-white bg-gray-700 hover:bg-gray-800" href="<?= route_to(
|
2020-08-14 18:27:57 +00:00
|
|
|
'user-force_pass_reset',
|
2020-07-16 10:08:23 +00:00
|
|
|
$user->id
|
|
|
|
) ?>"><?= lang('User.forcePassReset') ?></a>
|
|
|
|
<a class="inline-flex px-2 py-1 mb-2 text-sm text-white bg-orange-700 hover:bg-orange-800" href="<?= route_to(
|
2020-08-14 18:27:57 +00:00
|
|
|
$user->isBanned() ? 'user-unban' : 'user-ban',
|
2020-07-16 10:08:23 +00:00
|
|
|
$user->id
|
|
|
|
) ?>">
|
|
|
|
<?= $user->isBanned()
|
|
|
|
? lang('User.unban')
|
|
|
|
: lang('User.ban') ?></a>
|
|
|
|
<a class="inline-flex px-2 py-1 text-sm text-white bg-red-700 hover:bg-red-800" href="<?= route_to(
|
2020-08-14 18:27:57 +00:00
|
|
|
'user-delete',
|
2020-07-16 10:08:23 +00:00
|
|
|
$user->id
|
|
|
|
) ?>"><?= lang('User.delete') ?></a>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2020-07-10 12:20:25 +00:00
|
|
|
|
|
|
|
<?= $this->endSection()
|
|
|
|
?>
|