aasdsd
This commit is contained in:
@@ -11,6 +11,15 @@ $headerTitle = $currentModule
|
||||
? (string)($currentModule['title'] ?? $currentModuleName)
|
||||
: ('Nexus' . ($isStagingHost ? ' (staging)' : ''));
|
||||
$headerText = $currentModule ? (string)($currentModule['description'] ?? '') : '';
|
||||
$headerTitle = isset($GLOBALS['layout_header_title']) && is_string($GLOBALS['layout_header_title']) && trim($GLOBALS['layout_header_title']) !== ''
|
||||
? trim($GLOBALS['layout_header_title'])
|
||||
: $headerTitle;
|
||||
$headerText = isset($GLOBALS['layout_header_text']) && is_string($GLOBALS['layout_header_text'])
|
||||
? trim($GLOBALS['layout_header_text'])
|
||||
: $headerText;
|
||||
$headerActions = isset($GLOBALS['layout_header_actions']) && is_array($GLOBALS['layout_header_actions'])
|
||||
? $GLOBALS['layout_header_actions']
|
||||
: [];
|
||||
$auth = app()->auth();
|
||||
$authUser = $auth->user();
|
||||
?>
|
||||
@@ -55,6 +64,23 @@ $authUser = $auth->user();
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
<div class="theme-switcher" aria-label="Darstellung">
|
||||
<?php if ($headerActions !== []): ?>
|
||||
<div class="header-actions">
|
||||
<?php foreach ($headerActions as $headerAction): ?>
|
||||
<?php
|
||||
if (!is_array($headerAction)) {
|
||||
continue;
|
||||
}
|
||||
$actionHref = trim((string) ($headerAction['href'] ?? ''));
|
||||
$actionLabel = trim((string) ($headerAction['label'] ?? ''));
|
||||
if ($actionHref === '' || $actionLabel === '') {
|
||||
continue;
|
||||
}
|
||||
?>
|
||||
<a class="nav-link" href="<?= e($actionHref) ?>"><?= e($actionLabel) ?></a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
<?php if ($auth->isEnabled()): ?>
|
||||
<a class="auth-pill" href="<?= $authUser === null ? '/auth/login' : '/auth/logout' ?>">
|
||||
<?= $authUser === null ? 'Login' : 'Logout ' . e((string)($authUser['username'] ?? $authUser['name'] ?? '')) ?>
|
||||
|
||||
Reference in New Issue
Block a user