available() || $ownerKey === '') { echo '
Dashboard-System nicht verfügbar.
'; return; } if ($_SERVER['REQUEST_METHOD'] === 'POST') { $action = trim((string) ($_POST['action'] ?? '')); try { if ($action === 'add_item') { $dashboardId = (int) ($_POST['dashboard_id'] ?? 0); $itemType = trim((string) ($_POST['item_type'] ?? 'link')); $config = []; if ($itemType === 'page_module') { $config['page_module_id'] = (int) ($_POST['page_module_id'] ?? 0); } else { $config['url'] = trim((string) ($_POST['target_url'] ?? '')); } $service->createItem($dashboardId, $ownerKey, [ 'item_type' => $itemType, 'title' => trim((string) ($_POST['title'] ?? '')), 'description' => trim((string) ($_POST['description'] ?? '')), 'grid_column' => trim((string) ($_POST['grid_column'] ?? '')), 'grid_row' => trim((string) ($_POST['grid_row'] ?? '')), 'column_span' => (int) ($_POST['column_span'] ?? 1), 'row_span' => (int) ($_POST['row_span'] ?? 1), 'config' => $config, ]); $notice = 'Dashboard-Element hinzugefügt.'; } elseif ($action === 'delete_item') { $service->deleteItem((int) ($_POST['item_id'] ?? 0), (int) ($_POST['dashboard_id'] ?? 0), $ownerKey); $notice = 'Dashboard-Element entfernt.'; } } catch (\Throwable $exception) { $error = $exception->getMessage(); } } $accessibleDashboards = $service->listAccessibleDashboards($ownerKey, $groups); $selectedDashboardId = (int) ($_GET['id'] ?? 0); $currentDashboard = null; foreach ($accessibleDashboards as $dashboard) { if ((int) ($dashboard['id'] ?? 0) === $selectedDashboardId) { $currentDashboard = $dashboard; break; } } if ($currentDashboard === null) { $currentDashboard = $service->ensureDefaultDashboard($ownerKey, 'Mein Dashboard'); } $currentDashboardId = (int) ($currentDashboard['id'] ?? 0); $dashboardItems = $service->listItems($currentDashboardId); $ownPageModules = $service->listPageModulesForOwner($ownerKey); $pageModuleMap = []; foreach ($ownPageModules as $pageModule) { $pageModuleMap[(int) ($pageModule['id'] ?? 0)] = $pageModule; } $GLOBALS['layout_header_base_title'] = 'Nexus'; $GLOBALS['layout_header_title'] = 'Nexus'; $GLOBALS['layout_header_context'] = 'Dashboard'; $GLOBALS['layout_header_text'] = 'Persönliche Arbeitsfläche mit frei platzierbaren Dashboard-Elementen.'; ?>

Element hinzufügen

V1 unterstützt direkte Links, iFrames und gespeicherte Seitenmodule.

Noch keine Elemente vorhanden.

Für dieses Element ist noch kein Inhalt hinterlegt.