mirror of
https://gitlab.com/animath/si/plateforme-corres2math.git
synced 2025-01-05 23:02:26 +00:00
Design page "Mon équipe"
This commit is contained in:
parent
7e1b32d605
commit
615f2da9a4
@ -1,89 +1,97 @@
|
||||
<?php
|
||||
require_once "header.php";
|
||||
|
||||
if (!$has_error && isset($send_document))
|
||||
echo "<h2>Le fichier a été correctement envoyé !</h2>";
|
||||
?>
|
||||
|
||||
<h2>Informations sur l'équipe</h2>
|
||||
<div class="mt-4 mb-4">
|
||||
<h1 class="display-4">Mon équipe</h1>
|
||||
</div>
|
||||
|
||||
Nom de l'équipe : <?= $team->getName() ?><br/>
|
||||
Trigramme : <?= $team->getTrigram() ?><br/>
|
||||
Problème : <a href="/probleme/<?= $team->getProblem() ?>"><?= $team->getProblem() ?></a><br/>
|
||||
<?php
|
||||
if ($team->getEncadrantId() !== null) {
|
||||
$encadrant = User::fromId($team->getEncadrantId());
|
||||
$id = $encadrant->getId();
|
||||
echo "Encadrant : <a href=\"$URL_BASE/informations/$id/" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "\">" . $encadrant->getFirstName() . " " . $encadrant->getSurname() . "</a><br />";
|
||||
}
|
||||
for ($i = 1; $i <= 5; ++$i) {
|
||||
if ($team->getParticipants()[$i - 1] == NULL)
|
||||
continue;
|
||||
$participant = User::fromId($team->getParticipants()[$i - 1]);
|
||||
$id = $participant->getId();
|
||||
echo "Participant $i : <a href=\"$URL_BASE/informations/$id/" . $participant->getFirstName() . " " . $participant->getSurname() . "\">" . $participant->getFirstName() . " " . $participant->getSurname() . "</a><br />";
|
||||
}
|
||||
<?php if (!$has_error && isset($send_document)) { ?>
|
||||
<div class="alert alert-success">
|
||||
Le fichier a été correctement envoyé !
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
?>
|
||||
Code d'accès : <strong><?= $team->getAccessCode() ?></strong><br/>
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
Autorise Animath à diffuser mes vidéos : <?= $team->allowPublish() ? "oui" : "non" ?> (<a
|
||||
href="/mon-equipe/diffusion-videos">changer</a>)<br/>
|
||||
<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>Problème :</strong> <a href="/probleme/<?= $team->getProblem() ?>"><?= $team->getProblem() ?></a>
|
||||
</div>
|
||||
<div class="alert alert-info">
|
||||
<?php
|
||||
if ($team->getEncadrantId() !== null) {
|
||||
$encadrant = User::fromId($team->getEncadrantId());
|
||||
$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 <= 5; ++$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 />";
|
||||
}
|
||||
|
||||
?>
|
||||
</div>
|
||||
<div class="alert alert-info">
|
||||
Code d'accès : <strong><?= $team->getAccessCode() ?></strong>
|
||||
</div>
|
||||
<div class="alert alert-info">
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
Autorise Animath à diffuser mes vidéos : <?= $team->allowPublish() ? "oui" : "non" ?> (<a
|
||||
href="/mon-equipe/diffusion-videos">changer</a>)
|
||||
</div>
|
||||
|
||||
<?php if (date("Y-m-d H:i:s") >= $CONFIG->getInscriptionDate() && $team->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
|
||||
<strong>La date limite d'inscription est dépassée, vous ne pouvez plus demander la validation de votre
|
||||
équipe.</strong>
|
||||
<div class="alert alert-danger">
|
||||
La date limite d'inscription est dépassée, vous ne pouvez plus demander la validation de votre équipe.
|
||||
</div>
|
||||
<?php } else {
|
||||
if (isset($_GET["modifier"])) { ?>
|
||||
|
||||
<form method="POST">
|
||||
<input type="hidden" name="team_edit" value="true"/>
|
||||
<table >
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width: 30%;">
|
||||
<label for="name">Nom :</label>
|
||||
</td>
|
||||
<td style="width: 70%;">
|
||||
<input type="text" id="name" name="name" value="<?= $team->getName() ?>"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="trigram">Trigramme :</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id="trigram" name="trigram"
|
||||
value="<?= $team->getTrigram() ?>"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="problem">Problème :</label>
|
||||
</td>
|
||||
<td>
|
||||
<select id="problem" name="problem">
|
||||
<?php
|
||||
for ($i = 1; $i <= 4; ++$i)
|
||||
echo "<option value=\"$i\" " . ($team->getProblem() == $i ? "selected" : "") . ">$i</option>\n";
|
||||
?>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="submit" value="Modifier l'équipe"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<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"
|
||||
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="problem">Problème :</label>
|
||||
<select id="problem" name="problem" class="custom-select">
|
||||
<?php
|
||||
for ($i = 1; $i <= 4; ++$i)
|
||||
echo "<option value='$i' " . ($team->getProblem() == $i ? "selected" : "") . ">$i</option>";
|
||||
?>
|
||||
</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>
|
||||
</form>
|
||||
|
||||
<?php } else { ?>
|
||||
|
||||
<?php if ($team->getValidationStatus() == ValidationStatus::NOT_READY && date("Y-m-d H:i:s") <= $CONFIG->getInscriptionDate()) { ?>
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<a href="/mon-equipe/modifier">Modifier mon équipe</a>
|
||||
<a href="/mon-equipe/modifier">
|
||||
<button class="btn btn-secondary btn-lg btn-block">Modifier mon équipe</button>
|
||||
</a>
|
||||
<?php } ?>
|
||||
<hr/>
|
||||
<h2>Autorisation de droit à l'image</h2>
|
||||
@ -91,49 +99,38 @@ for ($i = 1; $i <= 5; ++$i) {
|
||||
printDocuments($documents);
|
||||
|
||||
if ($team->getValidationStatus() == ValidationStatus::NOT_READY) { ?>
|
||||
<hr/>
|
||||
<form method="post" enctype="multipart/form-data">
|
||||
<input type="hidden" name="type" value="photo_consent"/>
|
||||
<table >
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="file">Fichier :</label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="file" id="file" name="document"/>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<input type="submit" name="send_document" value="Envoyer le document"/>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<form method="POST" enctype="multipart/form-data">
|
||||
|
||||
<div class="form-row">
|
||||
<div class="form-group col-md-12">
|
||||
<label for="document">Fichier :</label>
|
||||
<input class="form-control" type="file" id="document" name="document" required/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<input class="btn btn-primary btn-lg btn-block" type="submit" name="send_document"
|
||||
value="Envoyer le document"/>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<hr/>
|
||||
<table >
|
||||
<tr>
|
||||
<td style="width: 50%;">
|
||||
<form method="post">
|
||||
<input type="submit" name="leave_team" value="Quitter l'équipe"/>
|
||||
</form>
|
||||
</td>
|
||||
<?php
|
||||
$can_validate = canValidate($team);
|
||||
if ($can_validate) { ?>
|
||||
<td style="width: 50%;">
|
||||
<form method="post">
|
||||
<input type="checkbox" name="engage" id="engage"/> <label for="engage">Je m'engage à
|
||||
participer à l'intégralité des Correspondances</label><br/>
|
||||
<input type="submit" name="request_validation"
|
||||
value="Demander la validation"/>
|
||||
</form>
|
||||
</td>
|
||||
<?php } ?>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<form method="POST">
|
||||
<input class="btn btn-primary btn-lg btn-block" type="submit" name="leave_team"
|
||||
value="Quitter l'équipe"/>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
$can_validate = canValidate($team);
|
||||
if ($can_validate) { ?>
|
||||
<form method="post">
|
||||
<input class="form-control" type="checkbox" name="engage" id="engage"/> <label for="engage">Je m'engage à
|
||||
participer à l'intégralité des Correspondances</label><br/>
|
||||
<input class="btn btn-primary btn-lg btn-block" type="submit" name="request_validation"
|
||||
value="Demander la validation"/>
|
||||
</form>
|
||||
<?php } ?>
|
||||
<?php } else if (Phase::getCurrentPhase() >= Phase::PHASE1) { ?>
|
||||
<hr/>
|
||||
<h2>Déroulement du tournoi</h2>
|
||||
@ -152,7 +149,7 @@ for ($i = 1; $i <= 5; ++$i) {
|
||||
$answer = Video::getVideo($asker->getVideoTeamIds()[0] == $team->getId() ? Reason::ANSWER1 : Reason::ANSWER2, $asker);
|
||||
?>
|
||||
<h5>Questions de l'équipe <?= $asker->getName() ?> (<?= $asker->getTrigram() ?>) :</h5>
|
||||
<table >
|
||||
<table>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($j = 0; $j < 6; ++$j) {
|
||||
@ -231,7 +228,7 @@ for ($i = 1; $i <= 5; ++$i) {
|
||||
<br/>
|
||||
<h5>Vos questions :</h5>
|
||||
<br/>
|
||||
<table >
|
||||
<table>
|
||||
<tbody>
|
||||
<?php
|
||||
for ($j = 0; $j < 6; ++$j) {
|
||||
|
Loading…
Reference in New Issue
Block a user