Lehrplan: Country-Helper + Landeinstellung live
- App/php/lib/Country.php: Kaskade session → classes → teachers → cookie → 'AT', Helper current()/flag()/label()/allCountries() - App/php/api/country.php: GET + POST /api/country - country-Spalten in teachers, classes, student_sessions (idempotent) - Native-<select>-Picker im Header aller öffentlichen Seiten (modul-*.php, lehrplan.php, simulationen.php) - Footer-Links "Andere Länder: 🇨🇭 🇩🇪 🇱🇮" - lehrplan.php liest Default-Filter jetzt aus Country::current() - iPad-freundlich: Native Select gibt Wheel-Picker auf iOS, Touch-Ziel >=40px Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
/**
|
||||
* Country-Footer — „Andere Länder: 🇨🇭 / 🇩🇪 / 🇱🇮"
|
||||
* --------------------------------------------------
|
||||
* Kleine Zeile unten in den öffentlichen Seiten. Zeigt die jeweils
|
||||
* *nicht* aktuell gewählten Länder mit Flaggen-Link.
|
||||
*/
|
||||
require_once __DIR__ . '/../../php/lib/Country.php';
|
||||
|
||||
$current = Country::current();
|
||||
$others = array_filter(Country::allCountries(), fn($c) => $c !== $current);
|
||||
?>
|
||||
<div class="md-country-foot">
|
||||
Andere Länder:
|
||||
<?php foreach ($others as $c): ?>
|
||||
<a href="?country=<?= htmlspecialchars($c) ?>"
|
||||
onclick="event.preventDefault(); window.__GGS_setCountry('<?= htmlspecialchars($c) ?>');"
|
||||
class="md-country-foot-link"
|
||||
title="<?= htmlspecialchars(Country::label($c)) ?>">
|
||||
<?= Country::flag($c) ?> <?= htmlspecialchars(Country::label($c)) ?>
|
||||
</a>
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.md-country-foot {
|
||||
font-size: .78rem; color: var(--ggs-text-muted);
|
||||
padding: .6rem 0 0;
|
||||
text-align: center;
|
||||
}
|
||||
.md-country-foot a {
|
||||
display: inline-block; margin: 0 .3rem; padding: .3rem .5rem;
|
||||
color: var(--ggs-fjord); text-decoration: none;
|
||||
border-radius: var(--ggs-radius-sm);
|
||||
min-height: 32px;
|
||||
}
|
||||
.md-country-foot a:hover { background: var(--ggs-fjord-light); }
|
||||
</style>
|
||||
Reference in New Issue
Block a user