diff --git a/partials/landingpages/modules/index.php b/partials/landingpages/modules/index.php index 136f28a..ecbe651 100644 --- a/partials/landingpages/modules/index.php +++ b/partials/landingpages/modules/index.php @@ -2,6 +2,34 @@ $modules = modules()->all(); $error = null; $notice = null; +$GLOBALS['layout_header_title'] = 'Aktive Module verwalten'; +$GLOBALS['layout_header_text'] = ''; +$GLOBALS['layout_header_actions'] = [ + ['href' => '/modules/install', 'label' => 'Module installieren/aktivieren'], + ['href' => '/modules/sql-import', 'label' => 'Zentralen SQL-Import öffnen'], +]; +$knownAuthUsers = modules()->knownAuthUsers(); +$authUserLabels = []; +foreach ($knownAuthUsers as $knownAuthUser) { + if (!is_array($knownAuthUser)) { + continue; + } + + $label = trim((string) ($knownAuthUser['name'] ?? '')); + if ($label === '') { + $label = trim((string) ($knownAuthUser['username'] ?? '')); + } + if ($label === '') { + $label = trim((string) ($knownAuthUser['email'] ?? '')); + } + + foreach (['sub', 'username', 'email'] as $key) { + $value = trim((string) ($knownAuthUser[$key] ?? '')); + if ($value !== '' && $label !== '') { + $authUserLabels[$value] = $label; + } + } +} if ($_SERVER['REQUEST_METHOD'] === 'POST') { require_admin(); @@ -24,13 +52,6 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') { ?>
-
Module
-

Module verwalten

-

Hier siehst du nur aktive Module. Installierte Module kannst du unten verwalten.

-

- Zentralen SQL-Import öffnen -

- - -
- Module installieren/aktivieren -
diff --git a/partials/structure/layout_start.php b/partials/structure/layout_start.php index 4cb0a6c..c4202ad 100755 --- a/partials/structure/layout_start.php +++ b/partials/structure/layout_start.php @@ -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();
+ +
+ + + + +
+ isEnabled()): ?> diff --git a/public/assets/css/app.css b/public/assets/css/app.css index d787994..a7175ed 100644 --- a/public/assets/css/app.css +++ b/public/assets/css/app.css @@ -414,6 +414,13 @@ body.has-modal-open { margin-left: auto; } +.header-actions { + display: flex; + flex-wrap: wrap; + gap: 10px; + align-items: center; +} + .auth-pill { align-self: end; display: inline-flex; @@ -515,6 +522,10 @@ body.has-modal-open { margin-left: 0; } + .header-actions { + width: 100%; + } + .brand-mark { width: 60px; height: 60px;