Clean up
All checks were successful
Deploy / deploy (push) Successful in 54s

This commit is contained in:
2026-08-21 02:20:46 +02:00
parent fae2dcc830
commit c8ed8fab3b
12 changed files with 130 additions and 80 deletions

View File

@@ -77,7 +77,7 @@ $migrationStatus = ($migration && $canManageApplications) ? $migration->status()
<div class="forum-breadcrumbs">
<a href="/">Home</a>
<span>/</span>
<a href="/dashboard">Mitgliederbereich</a>
<a href="/dashboard?area=admin&amp;section=admin-home">Admin-Einstellungen</a>
<span>/</span>
<span>Community-Admin</span>
</div>
@@ -88,7 +88,7 @@ $migrationStatus = ($migration && $canManageApplications) ? $migration->status()
<p class="forum-hero__copy">Moderation, Bewerbungen und Rollen an einem Ort.</p>
</div>
<div class="forum-hero__cta">
<a class="btn ghost" href="/dashboard">Zurück zum Mitgliederbereich</a>
<a class="btn ghost" href="/dashboard?area=admin&amp;section=admin-home">Zurück zu den Admin-Einstellungen</a>
</div>
</div>
@@ -101,7 +101,7 @@ $migrationStatus = ($migration && $canManageApplications) ? $migration->status()
<div class="forum-admin-grid">
<?php if ($canReviewListings): ?>
<section class="forum-board">
<section class="forum-board" id="listing-requests">
<div class="forum-board__head">
<div>
<h2>Offene Orts- und Veranstaltungsanfragen</h2>

View File

@@ -135,23 +135,26 @@ if ($priceRows === []) {
$editingChild = isset($editChild) && $editChild !== null;
$childAction = $editingChild ? 'child_update' : 'child_add';
$childModalTitle = $editingChild ? 'Kind bearbeiten' : 'Kind hinzufügen';
$sectionLinks = [
'profile' => 'Profil',
'children' => 'Kinder',
'events' => 'Events',
'places' => 'Orte & Veranstaltungen',
'community' => 'Community',
'settings' => 'Einstellungen',
];
if (!empty($canManageProfileLevels)) {
$sectionLinks['profile-levels'] = 'Profil-Levels';
}
$isAdminArea = ($area ?? 'profile') === 'admin';
$sectionLinks = $isAdminArea
? ['admin-home' => 'Übersicht']
: [
'profile' => 'Profil',
'children' => 'Kinder',
'events' => 'Events',
'places' => 'Orte & Veranstaltungen',
'community' => 'Community',
'settings' => 'Einstellungen',
];
$showEventTypeChoice = !$editing && (($section ?? 'events') === 'places') && $requestedCreateListingKind === null;
$modalSectionTarget = ($editingListing || ($section ?? '') === 'places') ? 'places' : 'events';
if (!empty($canManageCategories)) {
if ($isAdminArea && !empty($canManageCategories)) {
$sectionLinks['categories'] = 'Kategorien';
}
if (!empty($canManageSystemSettings)) {
if ($isAdminArea && !empty($canManageProfileLevels)) {
$sectionLinks['profile-levels'] = 'Profil-Levels';
}
if ($isAdminArea && !empty($canManageSystemSettings)) {
$sectionLinks['system'] = 'System';
}
?>
@@ -159,7 +162,7 @@ if (!empty($canManageSystemSettings)) {
<div class="container" style="display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px;">
<div>
<h1>Hallo, <span style="color: var(--color-primary);"><?= htmlspecialchars($profile['display_name'] ?: 'Papa', ENT_QUOTES) ?></span>!</h1>
<p class="muted">Verwalte dein Profil, Kinder, Events und Teilnahmen.</p>
<p class="muted"><?= $isAdminArea ? 'Verwalte Moderation, Freigaben und Systemeinstellungen.' : 'Verwalte dein Profil, Kinder, eigene Orte und Veranstaltungen sowie Einstellungen.' ?></p>
</div>
</div>
@@ -181,15 +184,67 @@ if (!empty($canManageSystemSettings)) {
<div class="account-sidebar__inner">
<nav class="account-sidebar__nav">
<?php foreach ($sectionLinks as $sectionKey => $sectionLabel): ?>
<a href="/dashboard?section=<?= rawurlencode($sectionKey) ?>" class="<?= $section === $sectionKey ? 'is-active' : '' ?>">
<a href="/dashboard?<?= $isAdminArea ? 'area=admin&amp;' : '' ?>section=<?= rawurlencode($sectionKey) ?>" class="<?= $section === $sectionKey ? 'is-active' : '' ?>">
<span><?= htmlspecialchars($sectionLabel, ENT_QUOTES) ?></span>
</a>
<?php endforeach; ?>
<?php if ($isAdminArea && !empty($canAccessCommunityAdmin)): ?>
<a href="/community-admin#listing-requests"><span>Orte &amp; Veranstaltungen freigeben</span></a>
<a href="/community-admin"><span>Community-Moderation</span></a>
<?php endif; ?>
<?php if ($isAdminArea): ?>
<a class="account-sidebar__back" href="/dashboard?section=profile"><span>Zum Profil</span></a>
<?php endif; ?>
</nav>
</div>
</aside>
<div class="account-main">
<?php if ($section === 'admin-home' && $isAdminArea): ?>
<section class="account-panel">
<div class="account-panel__head">
<h2>Admin-Einstellungen</h2>
<p class="muted">Hier liegen ausschließlich Funktionen zur Moderation und Verwaltung der Plattform.</p>
</div>
<div class="account-panel__body">
<div class="profile-summary-grid">
<?php if (!empty($canAccessCommunityAdmin)): ?>
<a class="profile-summary-card profile-summary-card--link" href="/community-admin#listing-requests">
<span class="profile-summary-card__eyebrow">Freigaben</span>
<strong>Orte &amp; Veranstaltungen</strong>
<p class="muted small">Neue Einträge sowie Änderungs- und Löschanfragen prüfen.</p>
</a>
<a class="profile-summary-card profile-summary-card--link" href="/community-admin">
<span class="profile-summary-card__eyebrow">Moderation</span>
<strong>Community</strong>
<p class="muted small">Meldungen, Bewerbungen und Rollen verwalten.</p>
</a>
<?php endif; ?>
<?php if (!empty($canManageCategories)): ?>
<a class="profile-summary-card profile-summary-card--link" href="/dashboard?area=admin&amp;section=categories">
<span class="profile-summary-card__eyebrow">Inhalte</span>
<strong>Kategorien</strong>
<p class="muted small">Neue Kategorien bestätigen und zusammenführen.</p>
</a>
<?php endif; ?>
<?php if (!empty($canManageProfileLevels)): ?>
<a class="profile-summary-card profile-summary-card--link" href="/dashboard?area=admin&amp;section=profile-levels">
<span class="profile-summary-card__eyebrow">Community</span>
<strong>Profil-Levels</strong>
<p class="muted small">Level, Punkte und Systemrollen verwalten.</p>
</a>
<?php endif; ?>
<?php if (!empty($canManageSystemSettings)): ?>
<a class="profile-summary-card profile-summary-card--link" href="/dashboard?area=admin&amp;section=system">
<span class="profile-summary-card__eyebrow">Betrieb</span>
<strong>System</strong>
<p class="muted small">Wartungs- und Diensteschalter konfigurieren.</p>
</a>
<?php endif; ?>
</div>
</div>
</section>
<?php endif; ?>
<?php if ($section === 'profile'): ?>
<section class="account-panel">
<div class="account-panel__head">