2021-09-02 18:34:25 +02:00
|
|
|
<?= $this->extend('_layout') ?>
|
2020-08-18 18:31:28 +02:00
|
|
|
|
|
|
|
<?= $this->section('title') ?>
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= lang('Page.all_pages') ?>
|
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
|
|
|
<?= $this->section('pageTitle') ?>
|
2020-08-18 18:31:28 +02:00
|
|
|
<?= lang('Page.all_pages') ?> (<?= count($pages) ?>)
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
|
|
|
<?= $this->section('headerRight') ?>
|
|
|
|
<?= button(lang('Page.create'), route_to('page-create'), [
|
2021-04-02 19:20:02 +02:00
|
|
|
'variant' => 'accent',
|
2020-10-02 17:38:16 +02:00
|
|
|
'iconLeft' => 'add',
|
|
|
|
]) ?>
|
2020-08-18 18:31:28 +02:00
|
|
|
<?= $this->endSection() ?>
|
|
|
|
|
|
|
|
|
|
|
|
<?= $this->section('content') ?>
|
|
|
|
|
2020-10-02 17:38:16 +02:00
|
|
|
<?= data_table(
|
|
|
|
[
|
|
|
|
[
|
|
|
|
'header' => lang('Page.page'),
|
|
|
|
'cell' => function ($page) {
|
|
|
|
return '<div class="flex flex-col">' .
|
|
|
|
$page->title .
|
|
|
|
'<span class="text-sm text-gray-600">/' .
|
|
|
|
$page->slug .
|
|
|
|
'</span></div>';
|
|
|
|
},
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'header' => lang('Common.actions'),
|
|
|
|
'cell' => function ($page) {
|
|
|
|
return button(
|
|
|
|
lang('Page.go_to_page'),
|
|
|
|
route_to('page', $page->slug),
|
|
|
|
[
|
|
|
|
'variant' => 'secondary',
|
|
|
|
'size' => 'small',
|
|
|
|
],
|
2021-09-08 17:51:33 +02:00
|
|
|
[
|
|
|
|
'class' => 'mr-2',
|
|
|
|
],
|
2020-10-02 17:38:16 +02:00
|
|
|
) .
|
|
|
|
button(
|
|
|
|
lang('Page.edit'),
|
|
|
|
route_to('page-edit', $page->id),
|
2021-09-08 17:51:33 +02:00
|
|
|
[
|
|
|
|
'variant' => 'info',
|
|
|
|
'size' => 'small',
|
|
|
|
],
|
|
|
|
[
|
|
|
|
'class' => 'mr-2',
|
|
|
|
],
|
2020-10-02 17:38:16 +02:00
|
|
|
) .
|
|
|
|
button(
|
|
|
|
lang('Page.delete'),
|
|
|
|
route_to('page-delete', $page->id),
|
2021-09-08 17:51:33 +02:00
|
|
|
[
|
|
|
|
'variant' => 'danger',
|
|
|
|
'size' => 'small',
|
|
|
|
],
|
2020-10-02 17:38:16 +02:00
|
|
|
);
|
|
|
|
},
|
|
|
|
],
|
|
|
|
],
|
2021-05-06 16:00:48 +02:00
|
|
|
$pages,
|
2020-10-02 17:38:16 +02:00
|
|
|
) ?>
|
2020-08-18 18:31:28 +02:00
|
|
|
|
|
|
|
<?= $this->endSection() ?>
|