Tipps: Alle offenen Runden zum Vortippen anbieten
This commit is contained in:
parent
c6a5111685
commit
63d73efc42
5 changed files with 47 additions and 5 deletions
|
|
@ -10,7 +10,7 @@ Diese Datei ersetzt die Erkundung. Erst hier nachschlagen, dann gezielt mit
|
|||
Abschnitt zu lesen. `docs/legacy/` ist absichtlich ausgeblendet (siehe
|
||||
`.ignore`); dort liegt der alte Laravel-Stand.
|
||||
|
||||
Umfang: 11373 Zeilen in 66 Dateien.
|
||||
Umfang: 11415 Zeilen in 66 Dateien.
|
||||
|
||||
## Einstiegspunkte
|
||||
|
||||
|
|
@ -121,10 +121,10 @@ ohne View.
|
|||
| `tippspiel/src/Views/register.php` | 81 | Registrierung inkl. Zahlungshinweis |
|
||||
| `tippspiel/src/Views/round.php` | 101 | Tippübersicht aller Spieler bis zu einer Runde |
|
||||
| `tippspiel/src/Views/settings.php` | 293 | Eigene Daten: IBAN/PayPal/Mobilnummer, E-Mail, Erinnerungen |
|
||||
| `tippspiel/src/Views/tipps/game.php` | 80 | Tipp-Formular für ein einzelnes Spiel |
|
||||
| `tippspiel/src/Views/tipps/index.php` | 164 | Tipp-Startseite: Runden mit Spielen, eigenen Tipps und Joker |
|
||||
| `tippspiel/src/Views/tipps/game.php` | 82 | Tipp-Formular für ein einzelnes Spiel |
|
||||
| `tippspiel/src/Views/tipps/index.php` | 202 | Tipp-Startseite: Runden mit Spielen, eigenen Tipps und Joker |
|
||||
| `tippspiel/src/Views/tipps/no_payment.php` | 9 | Hinweis auf offene Zahlung vor der Tippabgabe |
|
||||
| `tippspiel/src/Views/tipps/round.php` | 105 | Rundenliste mit Spielen, Tipps und Joker |
|
||||
| `tippspiel/src/Views/tipps/round.php` | 107 | Rundenliste mit Spielen, Tipps und Joker |
|
||||
|
||||
## Werkzeuge (`tools/`)
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ require __DIR__ . '/partials/header.php';
|
|||
<p>Abgabe bis <?php echo $tippableLock->format('d.m.Y H:i'); ?> Uhr</p>
|
||||
<?php endif; ?>
|
||||
<p>
|
||||
<a class="home-tipp-link" href="/index.php?page=tipp_round&id=<?php echo (int)$tippableRound['id']; ?>">Jetzt tippen</a>
|
||||
<a class="home-tipp-link" href="/index.php?page=tipps">Jetzt tippen</a>
|
||||
</p>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ $teamLogo = function ($name) {
|
|||
<div>Bereits verwendete Joker: <?php echo htmlspecialchars($jokerUsage); ?></div>
|
||||
<div>Maximale Anzahl gleicher Joker: <?php echo $maxIdenticalJokertipps; ?></div>
|
||||
|
||||
<p><a href="/index.php?page=tipps">Weitere Runden vortippen</a></p>
|
||||
|
||||
<p><strong>
|
||||
<span class="team-cell"><?php $l1 = $teamLogo($game['team1']); if ($l1): ?><img src="<?php echo htmlspecialchars($l1); ?>" alt="" class="team-logo" loading="lazy"><?php endif; ?><?php echo htmlspecialchars($game['team1']); ?></span>
|
||||
:
|
||||
|
|
|
|||
|
|
@ -14,6 +14,10 @@ $teamLogo = function ($name) {
|
|||
$cache[$name] = ($team && Team::logoExists($team)) ? Team::logoUrl($team) : null;
|
||||
return $cache[$name];
|
||||
};
|
||||
|
||||
$openRounds = array_values(array_filter($rounds, function ($round) {
|
||||
return !$round['locked'] && !empty($round['games']);
|
||||
}));
|
||||
?>
|
||||
|
||||
<p>Aktive Saison: <?php echo htmlspecialchars($activeSeason['name']); ?></p>
|
||||
|
|
@ -23,6 +27,15 @@ $teamLogo = function ($name) {
|
|||
<section class="tipp-round" id="round-<?php echo (int)$round['id']; ?>"
|
||||
data-lock-time="<?php echo $round['lock_time'] ? (int)$round['lock_time']->getTimestamp() : ''; ?>">
|
||||
<h2><?php echo htmlspecialchars($round['name']); ?></h2>
|
||||
<?php if ((int)$round['id'] === (int)$firstTippableRoundId && count($openRounds) > 1): ?>
|
||||
<nav class="tipp-open-rounds" aria-label="Weitere offene Runden">
|
||||
<strong>Weitere Runden vortippen:</strong>
|
||||
<?php foreach ($openRounds as $openRound): ?>
|
||||
<?php if ((int)$openRound['id'] === (int)$round['id']) continue; ?>
|
||||
<a href="/index.php?page=tipp_round&id=<?php echo (int)$openRound['id']; ?>"><?php echo htmlspecialchars($openRound['name']); ?></a>
|
||||
<?php endforeach; ?>
|
||||
</nav>
|
||||
<?php endif; ?>
|
||||
<?php if ($round['lock_time']): ?>
|
||||
<div>Runde sperrt sich: <?php echo $round['lock_time']->format('d.m.Y H:i'); ?></div>
|
||||
<?php endif; ?>
|
||||
|
|
@ -154,6 +167,31 @@ $teamLogo = function ($name) {
|
|||
<?php endif; ?>
|
||||
|
||||
<style>
|
||||
.tipp-open-rounds {
|
||||
margin: 0 0 1.8em;
|
||||
padding: 0.7em 0.9em;
|
||||
background: #eef7f0;
|
||||
border: 1px solid var(--line);
|
||||
border-radius: 8px;
|
||||
}
|
||||
.tipp-open-rounds strong {
|
||||
display: block;
|
||||
margin-bottom: 0.4em;
|
||||
}
|
||||
.tipp-open-rounds a {
|
||||
display: inline-block;
|
||||
margin: 0.15em 0.35em 0.15em 0;
|
||||
padding: 0.3em 0.7em;
|
||||
background: #fff;
|
||||
border: 1px solid var(--pitch);
|
||||
border-radius: 999px;
|
||||
text-decoration: none;
|
||||
font-weight: 700;
|
||||
}
|
||||
.tipp-open-rounds a:hover {
|
||||
background: var(--pitch);
|
||||
color: #fff;
|
||||
}
|
||||
.tipp-round { margin-bottom: 2.5em; }
|
||||
.tipp-round h2 { margin-bottom: 0.3em; scroll-margin-top: 1em; }
|
||||
.tipp-round .joker-icon { width: 1.5em; height: 1.5em; }
|
||||
|
|
|
|||
|
|
@ -20,6 +20,8 @@ $teamLogo = function ($name) {
|
|||
<div>Bereits verwendete Joker: <?php echo htmlspecialchars($jokerUsage); ?></div>
|
||||
<div>Maximale Anzahl gleicher Joker: <?php echo $maxIdenticalJokertipps; ?></div>
|
||||
|
||||
<p><a href="/index.php?page=tipps">Weitere Runden vortippen</a></p>
|
||||
|
||||
<?php if ($error): ?>
|
||||
<p style="color: red;"><?php echo htmlspecialchars($error); ?></p>
|
||||
<?php endif; ?>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue