ver 0.262 - pages module refactor and admin UX fixes

This commit is contained in:
2026-02-13 21:17:21 +01:00
parent a1633491d5
commit b4559a5e74
44 changed files with 2235 additions and 1803 deletions

View File

@@ -92,7 +92,7 @@ class BannerController
$rows[] = [
'lp' => $lp++ . '.',
'thumbnail' => $thumbnail,
'name' => '<a href="/admin/banners/banner_edit/id=' . $id . '">' . htmlspecialchars($name, ENT_QUOTES, 'UTF-8') . '</a>',
'name' => '<a href="/admin/banners/edit/id=' . $id . '">' . htmlspecialchars($name, ENT_QUOTES, 'UTF-8') . '</a>',
'status' => $isActive ? 'tak' : '<span style="color: #FF0000;">nie</span>',
'home_page' => $homePage === 1 ? '<span class="text-system">tak</span>' : 'nie',
'slider' => $homePage === 1 ? 'nie' : '<span class="text-system">tak</span>',
@@ -101,12 +101,12 @@ class BannerController
'_actions' => [
[
'label' => 'Edytuj',
'url' => '/admin/banners/banner_edit/id=' . $id,
'url' => '/admin/banners/edit/id=' . $id,
'class' => 'btn btn-xs btn-primary',
],
[
'label' => 'Usun',
'url' => '/admin/banners/banner_delete/id=' . $id,
'url' => '/admin/banners/delete/id=' . $id,
'class' => 'btn btn-xs btn-danger',
'confirm' => 'Na pewno chcesz usunac wybrany element?',
],
@@ -147,9 +147,9 @@ class BannerController
]),
$listRequest['perPageOptions'],
$sortableColumns,
'/admin/banners/view_list/',
'/admin/banners/list/',
'Brak danych w tabeli.',
'/admin/banners/banner_edit/',
'/admin/banners/edit/',
'Dodaj baner',
'banners/banners-list-custom-script'
);
@@ -235,7 +235,7 @@ class BannerController
\S::alert('Baner zostal usuniety.');
}
header('Location: /admin/banners/view_list/');
header('Location: /admin/banners/list/');
exit;
}
@@ -307,10 +307,10 @@ class BannerController
$actions = [
FormAction::save(
'/admin/banners/banner_save/' . ($isNew ? '' : 'id=' . $bannerId),
'/admin/banners/view_list/'
'/admin/banners/save/' . ($isNew ? '' : 'id=' . $bannerId),
'/admin/banners/list/'
),
FormAction::cancel('/admin/banners/view_list/'),
FormAction::cancel('/admin/banners/list/'),
];
return new FormEditViewModel(
@@ -321,8 +321,8 @@ class BannerController
$tabs,
$actions,
'POST',
'/admin/banners/banner_save/' . ($isNew ? '' : 'id=' . $bannerId),
'/admin/banners/view_list/',
'/admin/banners/save/' . ($isNew ? '' : 'id=' . $bannerId),
'/admin/banners/list/',
true,
['id' => $bannerId],
$languages,