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
-
-
= e($error) ?>
@@ -56,7 +77,11 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$accessParts[] = 'Gruppen: ' . implode(', ', $authGroups);
}
if ($authUsers !== []) {
- $accessParts[] = 'Nutzer: ' . implode(', ', $authUsers);
+ $userLabels = array_map(
+ static fn (string $user): string => $authUserLabels[$user] ?? $user,
+ $authUsers
+ );
+ $accessParts[] = 'Nutzer: ' . implode(', ', $userLabels);
}
$accessLabel = implode(' · ', $accessParts);
$accessClass = ' module-admin-badge--success';
@@ -118,8 +143,4 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
-
-
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();