available() || $ownerKey === '') { echo '
Dashboard-System nicht verfügbar.
'; return; } if ($_SERVER['REQUEST_METHOD'] === 'POST') { $action = trim((string) ($_POST['action'] ?? '')); try { if ($action === 'create_dashboard') { $service->createDashboard($ownerKey, [ 'title' => trim((string) ($_POST['title'] ?? '')), 'slug' => trim((string) ($_POST['slug'] ?? '')), 'description' => trim((string) ($_POST['description'] ?? '')), 'visibility' => trim((string) ($_POST['visibility'] ?? 'private')), 'is_default' => isset($_POST['is_default']), ]); $notice = 'Dashboard angelegt.'; } elseif ($action === 'set_default') { $service->setDefaultDashboard($ownerKey, (int) ($_POST['dashboard_id'] ?? 0)); $notice = 'Standard-Dashboard gesetzt.'; } elseif ($action === 'delete_dashboard') { $service->deleteDashboard((int) ($_POST['dashboard_id'] ?? 0), $ownerKey); $notice = 'Dashboard gelöscht.'; } } catch (\Throwable $exception) { $error = $exception->getMessage(); } } $dashboardsList = $service->listDashboardsForOwner($ownerKey); $GLOBALS['layout_header_base_title'] = 'Nexus'; $GLOBALS['layout_header_title'] = 'Nexus'; $GLOBALS['layout_header_context'] = 'Dashboards'; $GLOBALS['layout_header_text'] = 'Verwaltung persönlicher und später freigebbarer Dashboard-Flächen.'; ?>

Neues Dashboard

Sichtbarkeit
Standard
Öffnen