mirror of
https://code.castopod.org/adaures/castopod
synced 2025-05-13 17:55:47 +00:00

- add podcast sidebar navigation - add podcast dashboard with latest episodes - add pagination to podcast episodes - add components helper to reuse ui components (button, data_table, etc.) - enhance podcast and episode forms by splitting them into form sections - add hint tooltips to podcast and episode forms - transform radio inputs as buttons for better ux - replace explicit field by parental_advisory - replace author field by publisher - add podcasts_categories table to set multiple categories - use choices.js to enhance multiselect fields - update Language files - update js dependencies to latest versions closes #31, #9
90 lines
2.7 KiB
PHP
90 lines
2.7 KiB
PHP
<?= $this->extend('admin/_layout') ?>
|
|
|
|
<?= $this->section('title') ?>
|
|
<?= lang('User.all_users') ?>
|
|
<?= $this->endSection() ?>
|
|
|
|
<?= $this->section('pageTitle') ?>
|
|
<?= lang('User.all_users') ?> (<?= count($users) ?>)
|
|
<?= $this->endSection() ?>
|
|
|
|
<?= $this->section('headerRight') ?>
|
|
<?= button(lang('User.create'), route_to('user-create'), [
|
|
'variant' => 'primary',
|
|
'iconLeft' => 'user-add',
|
|
]) ?>
|
|
<?= $this->endSection() ?>
|
|
|
|
|
|
<?= $this->section('content') ?>
|
|
|
|
<?= 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) .
|
|
icon_button(
|
|
'edit',
|
|
lang('User.edit_roles', [
|
|
'username' => $user->username,
|
|
]),
|
|
route_to('user-edit', $user->id),
|
|
['variant' => 'info'],
|
|
['class' => 'ml-2']
|
|
);
|
|
},
|
|
],
|
|
[
|
|
'header' => lang('User.list.banned'),
|
|
'cell' => function ($user) {
|
|
return $user->isBanned()
|
|
? lang('Common.yes')
|
|
: lang('Common.no');
|
|
},
|
|
],
|
|
[
|
|
'header' => lang('Common.actions'),
|
|
'cell' => function ($user) {
|
|
return button(
|
|
lang('User.forcePassReset'),
|
|
route_to('user-force_pass_reset', $user->id),
|
|
[
|
|
'variant' => 'secondary',
|
|
'size' => 'small',
|
|
],
|
|
['class' => 'mr-2']
|
|
) .
|
|
button(
|
|
lang('User.' . ($user->isBanned() ? 'unban' : 'ban')),
|
|
route_to(
|
|
$user->isBanned() ? 'user-unban' : 'user-ban',
|
|
$user->id
|
|
),
|
|
['variant' => 'warning', 'size' => 'small'],
|
|
['class' => 'mr-2']
|
|
) .
|
|
button(
|
|
lang('User.delete'),
|
|
route_to('user-delete', $user->id),
|
|
['variant' => 'danger', 'size' => 'small']
|
|
);
|
|
},
|
|
],
|
|
],
|
|
$users
|
|
) ?>
|
|
|
|
<?= $this->endSection()
|
|
?>
|