2019-09-07 11:42:36 +00:00
< ? php
require_once " header.php " ;
?>
2019-09-06 11:48:50 +00:00
2019-12-19 12:02:01 +00:00
< div class = " mt-4 mb-4 " >
< h1 class = " display-4 " > Mon équipe </ h1 >
</ div >
< div class = " alert alert-info " >
< strong > Nom de l ' équipe :</ strong > < ? = $team -> getName () ?>
</ div >
< div class = " alert alert-info " >
< strong > Trigramme :</ strong > < ? = $team -> getTrigram () ?>
</ div >
< div class = " alert alert-info " >
< strong > Tournoi :</ strong >
< ? = $tournament == null ? " Pas de tournoi attribué " : " <a href= \" /tournoi/ " . $tournament -> getName () . " \" > " . $tournament -> getName () . " </a> " ?>
</ div >
< div class = " alert alert-info " >
< ? php
for ( $i = 1 ; $i <= 2 ; ++ $i ) {
2020-01-01 21:41:08 +00:00
if ( $team -> getEncadrants ()[ $i - 1 ] == NULL )
2019-12-19 12:02:01 +00:00
continue ;
$encadrant = User :: fromId ( $team -> getEncadrants ()[ $i - 1 ]);
$id = $encadrant -> getId ();
echo " <strong>Encadrant $i :</strong> <a href= \" /informations/ $id / " . $encadrant -> getFirstName () . " " . $encadrant -> getSurname () . " \" > " . $encadrant -> getFirstName () . " " . $encadrant -> getSurname () . " </a><br /> " ;
}
for ( $i = 1 ; $i <= 6 ; ++ $i ) {
if ( $team -> getParticipants ()[ $i - 1 ] == NULL )
continue ;
$participant = User :: fromId ( $team -> getParticipants ()[ $i - 1 ]);
$id = $participant -> getId ();
echo " <strong>Participant $i :</strong> <a href= \" /informations/ $id / " . $participant -> getFirstName () . " " . $participant -> getSurname () . " \" > " . $participant -> getFirstName () . " " . $participant -> getSurname () . " </a><br /> " ;
}
?>
</ div >
< div class = " alert alert-info " >
Code d ' accès : < strong >< ? = $team -> getAccessCode () ?> </strong>
</ div >
2019-09-06 11:48:50 +00:00
2019-09-06 23:33:05 +00:00
< ? php if ( $team -> isSelectedForFinal ()) {
2019-09-07 12:31:28 +00:00
$final_name = $FINAL -> getName ();
2019-12-19 12:02:01 +00:00
echo " <div class= \" alert aler-success \" >Équipe sélectionnée pour la <a href= \" /tournoi/ $final_name\ " > finale nationale </ a >.</ div > " ;
2019-09-06 11:48:50 +00:00
} ?>
< ? php if ( isset ( $_GET [ " modifier " ])) { ?>
2019-09-07 23:35:05 +00:00
< form method = " POST " >
2019-12-19 12:02:01 +00:00
< div class = " form-row " >
< div class = " form-group col-md-6 " >
< label for = " name " > Nom :</ label >
< input class = " form-control " type = " text " id = " name " name = " name " pattern = " [A-Za-zÀ-ÿ ]+ "
value = " <?= $team->getName () ?> " required />
</ div >
< div class = " form-group col-md-6 " >
< label for = " trigram " > Trigramme :</ label >
< input class = " form-control " type = " text " id = " trigram " name = " trigram "
value = " <?= $team->getTrigram () ?> " pattern = " [A-Z] { 3} " maxlength = " 3 " required />
</ div >
</ div >
< div class = " form-group row " >
< label for = " tournament " > Tournoi :</ label >
< select id = " tournament " name = " tournament_id " class = " custom-select " >
< option value = " 0 " > Choisir un tournoi ...</ option >
< ? php
foreach ( $tournaments as $tournament )
echo " <option value= \" " . $tournament -> getId () . " \" "
. ( $tournament -> getId () == $team -> getTournamentId () ? " selected " : " " ) . " > "
. $tournament -> getName () . " </option> \n " ;
?>
</ select >
</ div >
< div class = " form-group row " >
< input class = " btn btn-primary btn-lg btn-block " name = " team_edit " type = " submit "
value = " Modifier l'équipe " />
</ div >
2019-09-07 23:35:05 +00:00
</ form >
2019-09-06 11:48:50 +00:00
< ? php } else { ?>
2020-01-16 21:04:29 +00:00
< ? php if ( $_SESSION [ " team " ] -> getValidationStatus () == ValidationStatus :: NOT_READY ) { ?>
2019-09-07 23:35:05 +00:00
<!-- suppress HtmlUnknownTarget -->
2019-12-19 12:02:01 +00:00
< a href = " /mon-equipe/modifier " >
< button class = " btn btn-secondary btn-lg btn-block " > Modifier mon équipe </ button >
</ a >
2019-09-06 11:48:50 +00:00
< ? php } ?>
2019-09-06 23:33:05 +00:00
< ? php if ( $team -> getValidationStatus () == ValidationStatus :: NOT_READY ) { ?>
2019-09-07 23:35:05 +00:00
< hr />
2019-12-19 12:02:01 +00:00
< form method = " POST " >
< input class = " btn btn-primary btn-lg btn-block " type = " submit " name = " leave_team " style = " background-color: #ff2e34 "
value = " Quitter l'équipe " />
</ form >
< ? php
$can_validate = canValidate ( $team , $tournament );
if ( $can_validate ) { ?>
< hr />
< form method = " post " >
2020-01-16 21:04:29 +00:00
< label for = " engage " > Je m 'engage à participer à l' intégralité du TFJM² </ label >
2019-12-19 12:02:01 +00:00
< input type = " checkbox " name = " engage " id = " engage " required />
< div class = " alert alert-warning " >
< strong > Attention !</ strong > Une fois votre équipe validée , vous ne pourrez plus modifier le nom
2020-02-14 20:12:10 +00:00
de l 'équipe, le trigramme ou la composition de l' équipe .
2019-12-19 12:02:01 +00:00
</ div >
< input class = " btn btn-primary btn-lg btn-block " type = " submit " name = " request_validation "
value = " Demander la validation " />
</ form >
< ? php } else { ?>
< hr />
< div class = " alert alert-warning " >
2020-02-14 20:12:10 +00:00
Pour demander à valider votre équipe , vous devez avoir au moins un encadrant , quatre participants
et soumis une autorisation de droit à l ' image , une fiche sanitaire et une autorisation
2020-01-18 13:43:42 +00:00
parentale ( si besoin ) par participant , ainsi qu ' une lettre de motivation à transmettre aux organisateurs .
2020-02-14 20:12:10 +00:00
Les encadrants doivent également fournir une autorisation de droit à l ' image .
2019-12-19 12:02:01 +00:00
</ div >
< ? php } ?>
2020-04-13 01:41:15 +00:00
< hr >
< div class = " alert alert-danger " >
En raison du changement de format du TFJM² 2020 , il n ' y a plus de document obligatoire à envoyer . Les autorisations
précédemment envoyées ont été détruites . Seules les lettres de motivation ont été conservées , mais leur envoi
n ' est plus obligatoire .
</ div >
2019-12-19 12:02:01 +00:00
< ? php }
elseif ( $team -> getValidationStatus () == ValidationStatus :: WAITING ) { ?>
< div class = " alert alert-warning " >
Votre équipe est en attente de validation .
</ div >
2019-09-06 11:48:50 +00:00
< ? php } ?>
2019-12-19 12:02:01 +00:00
< hr />
2020-01-22 21:06:53 +00:00
< h2 > Documents de l ' équipe </ h2 >
2020-01-01 23:09:02 +00:00
< ? php printDocuments ( $documents );
if ( $team -> isSelectedForFinal ()) { ?>
< hr />
2020-01-22 21:06:53 +00:00
< h2 > Documents de l ' équipe pour la finale </ h2 >
2020-01-01 23:09:02 +00:00
< ? php printDocuments ( $documents_final ); ?>
< ? php } ?>
2019-09-06 11:48:50 +00:00
< ? php } ?>
2019-09-07 11:42:36 +00:00
2020-05-04 23:06:57 +00:00
< ? php if ( $team -> getValidationStatus () == ValidationStatus :: VALIDATED ) { ?>
< hr >
< h2 > Solutions à opposer / rapporter </ h2 >
< div class = " alert alert-warning " >
Modèle vierge de note de synthèse ( < a data - turbolinks = " false " href = " Note de synthèse.pdf " > PDF </ a > -- < a data - turbolinks = " false " href = " Note de synthèse.tex " > TEX </ a > )
</ div >
< ? php
if ( $opposed_solution == null && $rapported_solution == null ) { ?>
< div class = " alert alert-warning " >
Les solutions du tour 1 seront disponibles sur cette page peu après le tirage .
</ div >
< ? php } else if ( date ( " Y-m-d H:i " , true ) < $tournament -> getSolutionsDate2 ()) { ?>
< div class = " alert alert-warning " >
Les solutions du tour 2 pourront être téléchargées sur cette page à partir du < ? = formatDate ( $tournament -> getSolutionsDate2 (), true ) ?> .
</ div >
< ? php
}
foreach ([[ $opposed_solution , DestType :: OPPOSANT , 1 ], [ $rapported_solution , DestType :: RAPPORTEUR , 1 ],
[ $opposed_solution_2 , DestType :: OPPOSANT , 2 ], [ $rapported_solution_2 , DestType :: RAPPORTEUR , 2 ]] as $arr ) {
$sol = $arr [ 0 ];
$source = $arr [ 1 ];
$round = $arr [ 2 ];
if ( $sol === null )
continue ;
$file_id = $sol -> getFileId ();
$problem = $sol -> getProblem ();
$t = Team :: fromId ( $sol -> getTeamId ());
$trigram = $t -> getTrigram ();
echo " <div class= \" alert alert- " . ( $round == 2 && date ( " Y-m-d H:i " ) < $tournament -> getSolutionsDate2 () ? " danger " : " info " ) . " \" ><strong>Problème $problem "
. " de l'équipe $trigram " . ( $source == DestType :: OPPOSANT ? " opposé " : " rapporté " ) . " , tour $round </strong> : <a data-turbolinks= \" false \" href= \" /file/ $file_id\ " > Télécharger </ a ></ div > \n " ;
}
?>
< ? php } ?>
2019-09-07 11:42:36 +00:00
< ? php require_once " footer.php " ?>