Move breadcrumb rendering from individual page templates into the core topbar. Each page now sets $breadcrumbs in its action .php file; the topbar renders it automatically via the shared partial. - Remove global back/forward buttons and app-nav-history.js component - Remove Alt+Arrow keyboard shortcuts for history navigation - Render breadcrumb in topbar-left section (replaces button area) - Clean up breadcrumb CSS: context-neutral base (flex, no margin) - Recalculate sticky titlebar offset in details container - Migrate all 41 pages (core + helpdesk, audit, addressbook, api-docs) - Add missing breadcrumbs to addressbook detail view - Update architecture contract tests (nav-history references removed) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
36 lines
1.2 KiB
PHP
36 lines
1.2 KiB
PHP
<?php
|
|
|
|
use MintyPHP\Http\SessionStoreInterface;
|
|
use MintyPHP\Module\Audit\AuditAuthorizationPolicy;
|
|
use MintyPHP\Module\Audit\Domain\UserLifecycleAction;
|
|
use MintyPHP\Module\Audit\Service\UserLifecycleAuditService;
|
|
use MintyPHP\Module\Audit\Support\AuditPageHelper;
|
|
use MintyPHP\Service\Access\UiAccessService;
|
|
|
|
$session = app(SessionStoreInterface::class)->all();
|
|
|
|
$auditLog = AuditPageHelper::findOrRedirect(
|
|
AuditAuthorizationPolicy::ABILITY_USER_LIFECYCLE_VIEW,
|
|
UserLifecycleAuditService::class,
|
|
'audit/user-lifecycle-audit',
|
|
'Lifecycle audit entry not found',
|
|
'user_lifecycle_audit_not_found',
|
|
'View user lifecycle audit entry',
|
|
$id ?? null
|
|
);
|
|
$breadcrumbs = [
|
|
['label' => t('Home'), 'path' => 'admin'],
|
|
['label' => t('User lifecycle logs'), 'path' => 'audit/user-lifecycle-audit'],
|
|
['label' => t('View')],
|
|
];
|
|
|
|
$auditService = app(UserLifecycleAuditService::class);
|
|
$snapshot = null;
|
|
if ((string) ($auditLog['action'] ?? '') === UserLifecycleAction::Delete->value) {
|
|
$snapshot = $auditService->decryptSnapshot($auditLog);
|
|
}
|
|
$viewAuth['page'] = app(UiAccessService::class)->pageCapabilities(
|
|
(int) ($session['user']['id'] ?? 0),
|
|
['can_restore' => AuditAuthorizationPolicy::ABILITY_USER_LIFECYCLE_RESTORE]
|
|
);
|