Files
ESBSC-CONVOC/templates/played_group.php
2026-11-11 09:24:28 +01:00

8 lines
2.6 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<section class="card"><h2><?=e($match['short_name'].' · '.$match['opponent'])?></h2><p><?=e($match['match_date'].' · '.$match['competition'])?> — <?=e(\App\Sports::MATCH_STATUSES[$match['status']])?></p><p>Groupe constaté sur la FMI et participations confirmées lors de son import. Cette page ne modifie pas la convocation préparatoire.</p>
<?php if(!$group): ?><div class="notice warning">Aucune composition FMI importée pour ce match. Le calendrier seul ne permet pas de reconstituer le groupe.</div><a href="/fmi">Importer la FMI</a><?php else: ?><table><thead><tr><th>N°</th><th>Personne</th><th>Statut</th><th>Participation</th></tr></thead><tbody><?php foreach($group as $p): ?><tr><td><?=$p['shirt_number']?></td><td><?=e($p['last_name'].' '.$p['first_name'])?><small><?=e($p['person_number'])?></small></td><td><?=$p['starter']?'Titulaire':'Remplaçant'?></td><td><?=$p['participated']?'A joué':'N’a pas participé'?></td></tr><?php endforeach ?></tbody></table><a href="/fmi/pdf?id=<?=$group[0]['upload_id']?>" target="_blank" rel="noopener">Ouvrir la FMI originale</a><?php endif ?></section>
<?php if($write&&$group): ?><section class="card"><h2>Précisions de participation</h2><p>À renseigner uniquement pour une exception de première réserve. La période désigne la toute première entrée en jeu, pas une rentrée après remplacement. Ces précisions restent enregistrées pour les contrôles suivants.</p>
<?php foreach($group as $p):if(!$p['participated'])continue; ?><details><summary><?=e($p['last_name'].' '.$p['first_name'])?> · <?=e($p['starter']?'Titulaire':(['unknown'=>'Entrée à préciser','first'=>'Première période','second'=>'Seconde période'][$p['entry_period']]))?></summary><form method="post" action="/participation/details"><?=csrf()?><input type="hidden" name="revision" value="<?=$revision?>"><input type="hidden" name="match_id" value="<?=$match['id']?>"><input type="hidden" name="player_id" value="<?=$p['player_id']?>">
<?=selectField('entry_period','Première entrée en jeu',$p['starter']?['first'=>'Titulaire, première période']:['unknown'=>'Non renseignée','first'=>'Première période','second'=>'Seconde période'],$p['starter']?'first':$p['entry_period'])?>
<?=selectField('goalkeeper','Gardien de but dans ce match',['unknown'=>'Non renseigné','0'=>'Non','1'=>'Oui'],$p['goalkeeper']===null?'unknown':(string)$p['goalkeeper'])?>
<?=field('reference','Source / justification (FMI, confirmation du responsable)',$p['entry_reference']??'','text',true)?><button>Enregistrer la précision</button></form></details><?php endforeach ?></section><?php endif ?>