diff --git a/assets/css/style.css b/assets/css/style.css index ae8a7d4..2f55b1a 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -10135,9 +10135,17 @@ a.hunt-spot-image { border: none; border-radius: 0; aspect-ratio: 16 / 9; backgr .hunt-add-spot { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); gap: 0.75rem; max-width: 560px; } .hunt-add-spot h3 { margin: 0; } -.hunt-review-spot { margin-top: 1.25rem; } -.hunt-review-spot h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 0.6rem; } -.hunt-review-spot h3 .text-muted { font-size: 0.85rem; font-weight: 400; } +.hunt-review-filter { margin: 0.5rem 0 0.25rem; } +.hunt-review-spot { margin-top: 0.6rem; border: 1px solid var(--border); border-radius: 8px; padding: 0.5rem 0.75rem; scroll-margin-top: 1rem; } +.hunt-review-spot > summary { display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem; cursor: pointer; list-style: none; } +.hunt-review-spot > summary::-webkit-details-marker { display: none; } +.hunt-review-spot > summary::after { content: '▾'; margin-left: auto; color: var(--text-muted); } +.hunt-review-spot[open] > summary::after { content: '▴'; } +.hunt-review-spot[open] > summary { margin-bottom: 0.6rem; } +.hunt-review-spot-title { font-size: 1.1rem; font-weight: 700; color: var(--gold); } +.hunt-review-spot > summary:hover .hunt-review-spot-title { color: var(--gold-hover); } +.hunt-review-spot > summary .text-muted { font-size: 0.85rem; } +.hunt-review-spot > p { margin: 0.25rem 0 0.4rem; } a.hunt-review-spot-thumb { width: 64px; height: 40px; flex-shrink: 0; } .hunt-submission { display: grid; grid-template-columns: 56px minmax(170px, 1fr) minmax(220px, 1.2fr) minmax(240px, 1.2fr); gap: 0.9rem; align-items: center; padding: 0.75rem; margin-bottom: 0.5rem; background: var(--bg-panel-alt); border: 1px solid var(--border); border-left: 3px solid var(--gold); border-radius: 8px; scroll-margin-top: 1rem; } .hunt-submission-accepted { border-left-color: var(--success); } diff --git a/hunt.php b/hunt.php index cbe206c..b4137b6 100644 --- a/hunt.php +++ b/hunt.php @@ -118,9 +118,18 @@ $number = 0; foreach ($spots as $spot) { $labels[(int) $spot['id']] = hunt_spot_label($spot, empty($spot['is_bonus']) ? ++$number : 0); } -$pendingTotal = 0; +// Einsendungen nach Status zaehlen - fuer die Filter der Leitung (?status=pending|accepted|rejected) +$statusCounts = ['pending' => 0, 'accepted' => 0, 'rejected' => 0]; foreach ($bySpot as $rows) { - $pendingTotal += count(array_filter($rows, static fn (array $r): bool => $r['status'] === 'pending')); + foreach ($rows as $row) { + $statusCounts[$row['status']]++; + } +} +$pendingTotal = $statusCounts['pending']; +$reviewFilters = ['all' => 'Alle', 'pending' => 'Unbewertet', 'accepted' => 'Anerkannt', 'rejected' => 'Abgelehnt']; +$reviewFilter = (string) ($_GET['status'] ?? 'all'); +if (!array_key_exists($reviewFilter, $reviewFilters)) { + $reviewFilter = 'all'; } $pageTitle = $hunt['title'] . ' - Schnitzeljagd'; @@ -283,16 +292,37 @@ include __DIR__ . '/includes/header.php';
Nur die Leitung sieht diese Bilder. Beim Anerkennen die Uhrzeit eintragen, die im Spiel auf dem Screenshot zu sehen ist (vorausgefüllt mit der Upload-Zeit) – danach richten sich Reihenfolge, Platz und Punkte; bei gleicher Uhrzeit zählt, wer zuerst hochgeladen hat. Punkte gibt es nur für anerkannte Einsendungen.
+Noch keine Orte.
- -Noch keine Einsendungen.
+= $allRows ? 'Keine Einsendungen in dieser Ansicht.' : 'Noch keine Einsendungen.' ?>
+