Rend les salles et tournées configurables

Refs #10 #21
This commit is contained in:
Alexandre NOEL 2026-09-08 00:33:25 +02:00
commit e7176b6371
17 changed files with 189 additions and 25 deletions

View file

@ -276,12 +276,11 @@ $fieldOptions = [
<div class="care-mode">
<div class="card mb-3">
<div class="card-body d-flex align-items-center gap-2 care-round-toolbar">
<strong
class="me-2"><?= h(t('care.round_of', ['period' => t($period === 'morning' ? 'care.morning' : 'care.evening')])) ?></strong>
<a class="btn <?= $period === 'morning' ? 'btn-primary' : 'btn-outline-primary' ?>"
href="/care-round?period=morning&date=<?= h($date) ?>">☀️ <?= h(t('care.morning')) ?></a>
<a class="btn <?= $period === 'evening' ? 'btn-primary' : 'btn-outline-primary' ?>"
href="/care-round?period=evening&date=<?= h($date) ?>">🌙 <?= h(t('care.evening')) ?></a>
<strong class="me-2"><?= h(t('care.round_of', ['period' => t('care.' . $period)])) ?></strong>
<?php foreach (['morning' => '☀️','noon' => '🕛','afternoon' => '🌤️','evening' => '🌙'] as $periodCode => $icon): ?>
<a class="btn <?= $period === $periodCode ? 'btn-primary' : 'btn-outline-primary' ?>"
href="/care-round?period=<?= h($periodCode) ?>&date=<?= h($date) ?>"><?= $icon ?> <?= h(t('care.' . $periodCode)) ?></a>
<?php endforeach; ?>
<div class="care-round-actions"><input class="form-control" type="date" value="<?= h($date) ?>"
onchange="location.href='/care-round?period=<?= h($period) ?>&date='+this.value">
<button class="btn btn-outline-secondary" type="button"