feature/UI-Update #11
@ -62,6 +62,7 @@ class DashboardController
|
||||
'data' => [
|
||||
// Die View erwartet aktuell $serverStatus.
|
||||
'serverStatus' => $serverStatus,
|
||||
'loginPage' => false,
|
||||
],
|
||||
'pageTitle' => 'Dashboard',
|
||||
// In der Sidebar soll der Dashboard-Menüpunkt aktiv sein.
|
||||
|
||||
@ -78,6 +78,7 @@ class UserManagementController
|
||||
'users' => $users,
|
||||
'groups' => $groups,
|
||||
'error' => $error,
|
||||
'loginPage' => false,
|
||||
],
|
||||
'pageTitle' => 'Benutzer & Gruppen',
|
||||
'activeMenu' => 'users',
|
||||
|
||||
@ -87,6 +87,11 @@ function handleResult(?array $result): void
|
||||
|
||||
$contentView = (string)($result['view'] ?? '');
|
||||
$viewData = (array)($result['data'] ?? []);
|
||||
// Standard: Wir gehen davon aus, dass es KEINE Loginseite ist,
|
||||
// außer der Controller sagt explizit etwas anderes.
|
||||
if (!array_key_exists('loginPage', $viewData)) {
|
||||
$viewData['loginPage'] = false;
|
||||
}
|
||||
$pageTitle = (string)($result['pageTitle'] ?? '');
|
||||
$activeMenu = $result['activeMenu'] ?? null;
|
||||
|
||||
|
||||
@ -27,6 +27,7 @@ function renderLayout(string $contentView, array $viewData, string $pageTitle, ?
|
||||
}
|
||||
|
||||
$partialsPath = __DIR__ . '/partials';
|
||||
$isLoginPage = !empty($viewData['loginPage']);
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
@ -38,7 +39,9 @@ function renderLayout(string $contentView, array $viewData, string $pageTitle, ?
|
||||
<!-- Page Wrapper -->
|
||||
<div id="wrapper">
|
||||
<!-- Begin Sidebar -->
|
||||
<?php if (!$viewData['loginPage']): require $partialsPath . '/sidebar.php'; endif ?>
|
||||
<?php if ($isLoginPage === false):
|
||||
require __DIR__ . '/partials/sidebar.php';
|
||||
endif;?>
|
||||
<!-- End of Sidebar -->
|
||||
<!-- Content Wrapper -->
|
||||
<div id="content-wrapper" class="d-flex flex-column">
|
||||
@ -46,7 +49,9 @@ function renderLayout(string $contentView, array $viewData, string $pageTitle, ?
|
||||
<!-- Main Content -->
|
||||
<div id="content">
|
||||
<!-- Begin Topbar -->
|
||||
<?php if (!$viewData['loginPage']): require $partialsPath . '/topbar.php'; endif; ?>
|
||||
<?php if ($isLoginPage === false):
|
||||
require __DIR__ . '/partials/topbar.php';
|
||||
endif; ?>
|
||||
<!-- End of Topbar -->
|
||||
<!-- Begin Page Content -->
|
||||
<div class="container-fluid">
|
||||
|
||||
Loading…
Reference in New Issue
Block a user