dsfdsf
All checks were successful
Deploy / deploy-staging (push) Successful in 6s
Deploy / deploy-production (push) Has been skipped

This commit is contained in:
2026-04-24 23:54:04 +02:00
parent 739e4d4c42
commit d6f09326f4
21 changed files with 355 additions and 364 deletions

View File

@@ -359,15 +359,25 @@ function module_shell_header(string $module, array $options = []): string
if (!is_array($tab)) {
continue;
}
$label = trim((string) ($tab['label'] ?? ''));
$href = trim((string) ($tab['href'] ?? ''));
if ($label === '' || $href === '') {
continue;
}
$isActive = !empty($tab['active']) || $href === $requestPath;
$class = $isActive ? 'module-button module-button--tab-active' : 'module-button module-button--tab';
$html .= '<a class="' . e($class) . '" href="' . e($href) . '">' . e($label) . '</a>';
$label = trim((string) ($tab['label'] ?? ''));
$href = trim((string) ($tab['href'] ?? ''));
if ($label === '' || $href === '') {
continue;
}
$matchPrefixes = is_array($tab['match_prefixes'] ?? null) ? $tab['match_prefixes'] : [];
$isActive = !empty($tab['active']) || $href === $requestPath;
if (!$isActive) {
foreach ($matchPrefixes as $prefix) {
$prefix = is_string($prefix) ? trim($prefix) : '';
if ($prefix !== '' && str_starts_with($requestPath, $prefix)) {
$isActive = true;
break;
}
}
}
$class = $isActive ? 'module-button module-button--tab-active' : 'module-button module-button--tab';
$html .= '<a class="' . e($class) . '" href="' . e($href) . '">' . e($label) . '</a>';
}
$html .= '</nav>';
}
if ($actions !== []) {