forked from fa/breadcrumb-the-shire
Splits the 755-line monolithic settings page into a tile-based landing hub and six focused subpages (general, security, email, api, sso, branding), each with its own form, CSRF scope and POST handler. Each subpage offers Save / Save & close buttons plus a Cancel/back link to the hub. Backend (AdminSettingsService, gateways, policies, DB schema) unchanged. A new settingsSectionMergePost() helper overlays section POSTs onto the current DB values so partial saves don't wipe unrelated fields (the service defaults missing keys to 0/empty). Sub-action files (logo/favicon/tokens/lifecycle) redirect to the matching subpage, and architecture contracts now check the subpage files instead of the removed monolithic index. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
69 lines
1.8 KiB
PHTML
69 lines
1.8 KiB
PHTML
<?php
|
|
|
|
/**
|
|
* Landing hub for admin/settings.
|
|
*
|
|
* Each section is a standalone subpage reachable via its own URL
|
|
* (admin/settings/<section>). This page renders a tile grid of entry points.
|
|
*/
|
|
|
|
?>
|
|
<div class="app-dashboard-titlebar">
|
|
<h1><?php e(t('Settings')); ?></h1>
|
|
</div>
|
|
<hr>
|
|
<div class="app-dashboard">
|
|
<div class="app-tiles">
|
|
<?php
|
|
appTile([
|
|
'href' => 'admin/settings/general',
|
|
'label' => t('General'),
|
|
'icon' => 'bi bi-sliders',
|
|
'iconBg' => '#e0ecff',
|
|
'iconColor' => '#2563eb',
|
|
'tooltip' => t('App title, language, user creation defaults'),
|
|
]);
|
|
appTile([
|
|
'href' => 'admin/settings/security',
|
|
'label' => t('Security'),
|
|
'icon' => 'bi bi-shield-lock',
|
|
'iconBg' => '#ede9fe',
|
|
'iconColor' => '#7c3aed',
|
|
'tooltip' => t('Sessions, registration, lifecycle, audit, telemetry'),
|
|
]);
|
|
appTile([
|
|
'href' => 'admin/settings/email',
|
|
'label' => t('Email'),
|
|
'icon' => 'bi bi-envelope',
|
|
'iconBg' => '#fef3c7',
|
|
'iconColor' => '#d97706',
|
|
'tooltip' => t('SMTP connection and sender details'),
|
|
]);
|
|
appTile([
|
|
'href' => 'admin/settings/api',
|
|
'label' => t('API'),
|
|
'icon' => 'bi bi-key',
|
|
'iconBg' => '#d1fae5',
|
|
'iconColor' => '#059669',
|
|
'tooltip' => t('API token policy and CORS allowlist'),
|
|
]);
|
|
appTile([
|
|
'href' => 'admin/settings/sso',
|
|
'label' => t('Microsoft SSO'),
|
|
'icon' => 'bi bi-microsoft',
|
|
'iconBg' => '#dbeafe',
|
|
'iconColor' => '#0891b2',
|
|
'tooltip' => t('Shared Microsoft Entra ID credentials'),
|
|
]);
|
|
appTile([
|
|
'href' => 'admin/settings/branding',
|
|
'label' => t('Branding'),
|
|
'icon' => 'bi bi-palette',
|
|
'iconBg' => '#fce7f3',
|
|
'iconColor' => '#be185d',
|
|
'tooltip' => t('App logo and favicon'),
|
|
]);
|
|
?>
|
|
</div>
|
|
</div>
|