From 995a8304cd71f4eb437a523717340b8074ba0cbb Mon Sep 17 00:00:00 2001 From: hypax Date: Wed, 15 Jul 2026 12:02:25 +0200 Subject: [PATCH] Drop empty protocol rail entry when all protocol plugins are off With eNOTF, fireTab and the MANV board all disabled, the Protokolle entry stayed behind as a dead, empty flyout - in both navigations. The new navigation filters merge-anchor rail entries that end up with neither sections nor an own link after the plugin fragments merged. The legacy sidebar skips the whole Protokolle block unless at least one protocol plugin is active. --- assets/components/navbar.php | 11 +++++++++-- src/Plugins/PluginLoader.php | 8 ++++++++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/assets/components/navbar.php b/assets/components/navbar.php index bde7c813..46a0039f 100644 --- a/assets/components/navbar.php +++ b/assets/components/navbar.php @@ -1475,14 +1475,20 @@ - + + isActive('enotf') + || $pluginNav->isActive('firetab') + || ($pluginNav->isActive('manv-board') && Permissions::check(['admin', 'mci.manage'])); + ?> + Protokolle + isActive('knowledge-base')): ?> diff --git a/src/Plugins/PluginLoader.php b/src/Plugins/PluginLoader.php index 4facf5ff..73b3848d 100644 --- a/src/Plugins/PluginLoader.php +++ b/src/Plugins/PluginLoader.php @@ -296,6 +296,14 @@ public function mergeNavigation(array $config): array } } + // Rail-Einträge, die nur als Merge-Anker dienen (keine eigenen + // Sections, kein eigener Link), verschwinden, wenn kein aktives + // Plugin etwas beigesteuert hat — sonst bleibt z.B. „Protokolle" + // als toter Eintrag stehen, wenn alle Protokoll-Plugins aus sind. + $rail = array_values(array_filter($rail, static function ($entry): bool { + return is_array($entry) && (!empty($entry['sections']) || !empty($entry['href'])); + })); + $config['rail'] = $rail; return $config; }