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