mirror of
https://gitlab.com/animath/si/plateforme.git
synced 2025-06-25 11:00:31 +02:00
Redesign du site
This commit is contained in:
@ -1,30 +1,63 @@
|
||||
<?php require_once "header.php" ?>
|
||||
|
||||
<h2>Informations sur l'équipe</h2>
|
||||
<div class="mt-4 mb-4">
|
||||
<h1 class="display-4">Informations sur l'équipe</h1>
|
||||
</div>
|
||||
|
||||
Nom de l'équipe : <?= $team->getName() ?><br/>
|
||||
Trigramme : <?= $team->getTrigram() ?><br/>
|
||||
Tournoi : <a href="<?= "/tournoi/" . $tournament->getName() ?>"><?= $tournament->getName() ?></a><br/>
|
||||
<?php
|
||||
for ($i = 1; $i <= 2; ++$i) {
|
||||
if ($team->getEncadrants()[$i - 1] == NULL)
|
||||
continue;
|
||||
$encadrant = User::fromId($team->getEncadrants()[$i - 1]);
|
||||
$id = $encadrant->getId();
|
||||
echo "Encadrant $i : <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 "Participant $i : <a href=\"/informations/$id/" . $participant->getFirstName() . " " . $participant->getSurname() . "\">" . $participant->getFirstName() . " " . $participant->getSurname() . "</a><br />";
|
||||
}
|
||||
if ($team->isSelectedForFinal()) {
|
||||
$final_name = $FINAL->getName();
|
||||
echo "<strong>Équipe sélectionnée pour la <a href=\"/tournoi/$final_name\">finale nationale</a>.</strong>";
|
||||
}
|
||||
?>
|
||||
<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">
|
||||
<?php if ($team->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
|
||||
<label for="tournament">Tournoi :</label>
|
||||
<form method="POST">
|
||||
<select class="custom-select" id="tournament" name="select_tournament" onchange="this.form.submit()">
|
||||
<option value="0">Pas de tournoi sélectionné</option>
|
||||
<?php
|
||||
foreach (Tournament::getAllTournaments(false, true) as $t) { ?>
|
||||
<option value="<?= $t->getId() ?>" <?= $team->getTournamentId() == $t->getId() ? "selected" : "" ?>>
|
||||
<?= $t->getName() ?>
|
||||
</option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</form>
|
||||
<?php } else { ?>
|
||||
<strong>Tournoi :</strong> <a href="<?= "/tournoi/" . $tournament->getName() ?>">
|
||||
<?= $team->getTournamentId() == 0 ? "Pas de tournoi choisi" : $tournament->getName() ?>
|
||||
</a>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="alert alert-<?= $team->getValidationStatus() == ValidationStatus::VALIDATED ? "success" : ($team->getValidationStatus() == ValidationStatus::WAITING ? "warning" : "danger") ?>">
|
||||
<strong>Validation de l'équipe
|
||||
:</strong> <?= ValidationStatus::getTranslatedName($team->getValidationStatus()) ?>
|
||||
</div>
|
||||
<div class="alert alert-info">
|
||||
<?php
|
||||
for ($i = 1; $i <= 2; ++$i) {
|
||||
if ($team->getEncadrants()[$i] == NULL)
|
||||
continue;
|
||||
$encadrant = User::fromId($team->getEncadrants()[$i - 1]);
|
||||
$id = $encadrant->getId();
|
||||
echo "<strong>Encadrant :</strong> <a href=\"$URL_BASE/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=\"$URL_BASE/informations/$id/" . $participant->getFirstName() . " " . $participant->getSurname() . "\">" . $participant->getFirstName() . " " . $participant->getSurname() . "</a><br />";
|
||||
}
|
||||
if ($team->isSelectedForFinal()) {
|
||||
$final_name = $FINAL->getName();
|
||||
echo "<strong>Équipe sélectionnée pour la <a href=\"/tournoi/$final_name\">finale nationale</a>.</strong>";
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
<hr/>
|
||||
|
||||
@ -33,31 +66,49 @@ if ($team->isSelectedForFinal()) {
|
||||
<?php printDocuments($documents) ?>
|
||||
|
||||
<form method="POST">
|
||||
<input style="width: 100%;" type="submit" name="download_zip" value="Télécharger l'archive"/>
|
||||
<input class="btn btn-secondary btn-lg btn-block" type="submit" name="download_zip" value="Télécharger l'archive"/>
|
||||
</form>
|
||||
|
||||
<?php if ($team->isSelectedForFinal()) { ?>
|
||||
<hr/>
|
||||
<h2>Autorisations pour la finale</h2>
|
||||
<?php printDocuments($documents_final) ?>
|
||||
<?php printDocuments($documents_final) ?>
|
||||
<form method="POST">
|
||||
<input type="hidden" name="final" value="true" />
|
||||
<input style="width: 100%;" type="submit" name="download_zip" value="Télécharger l'archive"/>
|
||||
<input class="btn btn-secondary btn-lg btn-block" type="submit" name="download_zip_final" value="Télécharger l'archive"/>
|
||||
</form>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($team->getValidationStatus() == ValidationStatus::WAITING && $_SESSION["role"] == Role::ADMIN) { ?>
|
||||
<form method="POST">
|
||||
<input style="width: 100%;" type="submit" name="validate" value="Valider l'équipe"/>
|
||||
<div class="form-group row">
|
||||
<label for="message">Message à adresser à l'équipe :</label>
|
||||
<textarea class="form-control" id="message" name="message"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="form-group row col-mod-6">
|
||||
<input type="submit" class="btn btn-secondary btn-lg btn-block" name="unvalidate"
|
||||
value="Refuser l'équipe"/>
|
||||
<input type="submit" class="btn btn-primary btn-lg btn-block" name="validate" value="Valider l'équipe"/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
|
||||
if (!$team->isSelectedForFinal() && $_SESSION["role"] == Role::ADMIN) { ?>
|
||||
if (!$team->isSelectedForFinal() && $team->getValidationStatus() == ValidationStatus::VALIDATED && $_SESSION["role"] == Role::ADMIN) { ?>
|
||||
<hr/>
|
||||
<form method="POST">
|
||||
<input style="width: 100%;" type="submit" name="select" value="Sélectionner pour la finale nationale"/>
|
||||
</form>
|
||||
<?php } ?>
|
||||
<?php }
|
||||
|
||||
if ($team->getValidationStatus() == ValidationStatus::NOT_READY && $_SESSION["role"] == Role::ADMIN) { ?>
|
||||
<hr/>
|
||||
<form method="POST">
|
||||
<input type="submit" class="btn btn-primary btn-lg btn-block" name="delete_team" value="Supprimer l'équipe"
|
||||
style="background-color: #ff2e34"/>
|
||||
</form>
|
||||
<?php }?>
|
||||
|
||||
<?php require_once "footer.php" ?>
|
Reference in New Issue
Block a user