Redesign authentication and website manager views with responsive layouts, clearer navigation, and accessibility improvements. Refresh page, menu, file, system information, settings, overview, welcome, page settings, and block thumbnail screens. Add the shared Admin stylesheet and Plugi theme, update the build configuration, and regenerate the admin CSS.
61 lines
1.7 KiB
PHP
61 lines
1.7 KiB
PHP
<?php
|
|
$modules = [
|
|
'listForms' => [
|
|
'include' => __DIR__ . '/Views/ListForms.php',
|
|
'label' => 'Forms',
|
|
'icon' => 'ph-list-dashes',
|
|
'showTabs' => true,
|
|
'inMenu' => true,
|
|
],
|
|
'settings' => [
|
|
'include' => __DIR__ . '/Views/ExtSettings.php',
|
|
'label' => 'Settings',
|
|
'icon' => 'ph-gear',
|
|
'showTabs' => true,
|
|
'inMenu' => true,
|
|
],
|
|
'editForm' => [
|
|
'include' => __DIR__ . '/Views/EditForm.php',
|
|
'showTabs' => false,
|
|
'inMenu' => false,
|
|
],
|
|
'listEntries' => [
|
|
'include' => __DIR__ . '/Views/ListEntries.php',
|
|
'showTabs' => false,
|
|
'inMenu' => false,
|
|
],
|
|
];
|
|
|
|
$activeModule = array_keys($modules)[0];
|
|
if (isset($_GET['action']) && array_key_exists($_GET['action'], $modules)) $activeModule = $_GET['action'];
|
|
|
|
?>
|
|
<?php
|
|
if ($modules[$activeModule]['showTabs'] === true):
|
|
?>
|
|
<nav class="mb-6 overflow-x-auto" aria-label="Form extension navigation">
|
|
<div class="tabs tabs-box w-max min-w-full bg-base-200/50">
|
|
<?php
|
|
foreach ($modules as $name => $module):
|
|
if ($module['inMenu'] === false) continue;
|
|
$icon = $module['icon'] ?? 'ph-circle';
|
|
?>
|
|
<a class="tab gap-2 <?= $name === $activeModule ? 'tab-active' : '' ?>" <?= $name === $activeModule ? 'aria-current="page"' : '' ?> href="<?= phpb_url('website_manager', ['tab' => 'ext--form', 'action' => $name]) ?>">
|
|
<i class="ph-duotone <?= $icon ?>" aria-hidden="true"></i>
|
|
<?= $module['label'] ?>
|
|
</a>
|
|
<?php
|
|
endforeach;
|
|
?>
|
|
</div>
|
|
</nav>
|
|
<?php
|
|
endif;
|
|
?>
|
|
<div class="w-full">
|
|
<?php
|
|
include $modules[$activeModule]['include'];
|
|
?>
|
|
</div>
|
|
|