From 42d60faf2773b54cd84f7e31e396d04fc4021b11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20Gla=CC=88ser?= Date: Mon, 15 Jun 2026 12:43:27 +0200 Subject: [PATCH] Add content card title by submenu --- modules/shared/auth/ui/home.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/modules/shared/auth/ui/home.php b/modules/shared/auth/ui/home.php index 923bb0c..687dc4a 100644 --- a/modules/shared/auth/ui/home.php +++ b/modules/shared/auth/ui/home.php @@ -75,7 +75,11 @@ function render_auth_home_page(array $user): void echo ''; echo ''; echo ''; - echo ''; + echo ''; echo ''; echo ''; echo ''; @@ -88,10 +92,12 @@ function render_auth_home_page(array $user): void echo "};"; echo "const renderLeftNavigation = (moduleName) => {"; echo " const title = document.querySelector('[data-left-navigation-title]');"; + echo " const contentTitle = document.querySelector('[data-left-navigation-content-title]');"; echo " const menu = document.getElementById('left-navigation-menu');"; echo " if (title) { title.textContent = moduleName; }"; echo " if (!menu) { return; }"; echo " const entries = portalModuleNavigation[moduleName] || [];"; + echo " if (contentTitle) { contentTitle.textContent = entries[0] || ''; }"; echo " menu.innerHTML = '';"; echo " entries.forEach((entry, index) => {"; echo " const button = document.createElement('button');"; @@ -108,6 +114,7 @@ function render_auth_home_page(array $user): void echo " menu.querySelectorAll('.sg-tab-button').forEach((otherButton) => {"; echo " otherButton.setAttribute('aria-selected', String(otherButton === button));"; echo " });"; + echo " if (contentTitle) { contentTitle.textContent = button.textContent.trim(); }"; echo " });"; echo " });"; echo "};";