2019-09-09 23:48:52 +00:00
|
|
|
<?php require_once "header.php" ?>
|
|
|
|
|
2019-09-24 23:15:03 +00:00
|
|
|
<div class="mt-4 mb-4">
|
|
|
|
<h1 class="display-4"><?= $user->getFirstName() . " " . $user->getSurname() ?></h1>
|
|
|
|
</div>
|
2019-09-09 23:48:52 +00:00
|
|
|
|
2019-09-27 22:48:30 +00:00
|
|
|
<?php
|
|
|
|
if (!$has_error) {
|
|
|
|
if (isset($_POST["kick"])) { ?>
|
|
|
|
<div class="alert alert-success">
|
|
|
|
La personne a bien été exclue de l'équipe !
|
|
|
|
</div>
|
|
|
|
<?php } elseif (isset($attribute_team)) { ?>
|
|
|
|
<div class="alert alert-success">
|
|
|
|
La personne a bien rejoint l'équipe !
|
|
|
|
</div>
|
|
|
|
<?php }
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
|
|
|
|
<div class="alert alert-info">
|
|
|
|
<strong>Rôle :</strong> <?= Role::getTranslatedName($user->getRole()) ?>
|
|
|
|
</div>
|
|
|
|
|
2019-09-09 23:48:52 +00:00
|
|
|
<?php if ($user->getRole() == Role::PARTICIPANT || $user->getRole() == Role::ENCADRANT) { ?>
|
2019-09-24 23:15:03 +00:00
|
|
|
<div class="alert alert-info">
|
|
|
|
<strong>Équipe
|
|
|
|
:</strong> <?= $team === null ? "Pas d'équipe" : "<a href=\"/equipe/" . $team->getTrigram() . "\">"
|
|
|
|
. $team->getName() . " (" . $team->getTrigram() . ")</a>" ?>
|
2019-09-27 22:48:30 +00:00
|
|
|
<?php if ($team == null) { ?>
|
|
|
|
<form method="POST">
|
|
|
|
<div class="form-group row">
|
|
|
|
<div class="form-group col-md-12">
|
|
|
|
<label for="team">Attribuer une équipe :</label>
|
|
|
|
<select class="custom-select" id="team" name="team">
|
|
|
|
<?php
|
|
|
|
/** @var Team $t */
|
|
|
|
foreach (Team::getAllTeams(-1) as $t) {
|
|
|
|
if ($t->getValidationStatus() != ValidationStatus::NOT_READY)
|
|
|
|
continue;
|
|
|
|
|
|
|
|
$team_name = $t->getName() . " (" . $t->getTrigram() . "), problème " . $t->getProblem();
|
|
|
|
$team_id = $t->getId();
|
|
|
|
echo "<option value=\"$team_id\">$team_name</option>\n";
|
|
|
|
}
|
|
|
|
?>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="form-group row">
|
|
|
|
<?php if (Phase::getCurrentPhase() < Phase::PHASE2) { ?>
|
|
|
|
<input type="submit" class="btn btn-secondary btn-lg btn-block" name="attribute_team"
|
|
|
|
value="Affecter dans une équipe"/>
|
|
|
|
<?php } ?>
|
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
<?php } elseif ($team->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
|
|
|
|
<form method="POST">
|
|
|
|
<input type="hidden" name="kick" />
|
|
|
|
<a href="#" onclick="this.parentNode.submit()">Virer de l'équipe</a>
|
|
|
|
</form>
|
|
|
|
<?php } ?>
|
2019-09-24 22:57:41 +00:00
|
|
|
</div>
|
2019-09-09 23:48:52 +00:00
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
<?php if ($user->getRole() == Role::PARTICIPANT) { ?>
|
2019-09-24 22:57:41 +00:00
|
|
|
<div class="alert alert-info">
|
2019-09-24 23:15:03 +00:00
|
|
|
<strong>Lycée :</strong> <?= $user->getSchool() ?><br/>
|
2019-09-24 22:57:41 +00:00
|
|
|
<strong>Classe :</strong> <?= SchoolClass::getTranslatedName($user->getClass()) ?>
|
|
|
|
</div>
|
2019-09-09 23:48:52 +00:00
|
|
|
<?php } elseif ($user->getDescription() != "") { ?>
|
2019-09-24 23:15:03 +00:00
|
|
|
<div class="alert alert-info">
|
2019-09-24 22:57:41 +00:00
|
|
|
<strong>Description :</strong> <?= $user->getDescription() ?>
|
|
|
|
</div>
|
2019-09-24 23:15:03 +00:00
|
|
|
<?php } ?>
|
|
|
|
|
|
|
|
<div class="alert alert-info">
|
|
|
|
<strong>Adresse e-mail :</strong> <a href="mailto:<?= $user->getEmail() ?>"><?= $user->getEmail() ?></a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="alert alert-info">
|
|
|
|
<strong>Autorise Animath à envoyer des mails :</strong> <?= $user->doReceiveAnimathMails() ? "oui" : "non" ?>
|
|
|
|
</div>
|
2019-09-09 23:48:52 +00:00
|
|
|
|
2019-09-24 23:15:03 +00:00
|
|
|
<hr/>
|
2019-09-09 23:48:52 +00:00
|
|
|
|
2019-09-27 22:48:30 +00:00
|
|
|
<?php if ($team != null && ($user->getRole() == Role::PARTICIPANT || $user->getRole() == Role::ENCADRANT)) { ?>
|
2019-09-24 22:57:41 +00:00
|
|
|
<div class="mt-4 mb-4">
|
|
|
|
<h1 class="display-5">Autorisation de droit à l'image :</h1>
|
|
|
|
</div>
|
2019-09-24 23:15:03 +00:00
|
|
|
<?php
|
|
|
|
printDocuments($documents);
|
2019-09-09 23:48:52 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
require_once "footer.php";
|