plateforme-tfjm2/server_files/views/syntheses.php

64 lines
2.4 KiB
PHP
Raw Normal View History

2019-09-06 11:48:50 +00:00
<?php
require_once "header.php";
2020-01-01 21:41:08 +00:00
if (date("Y-m-d H:i:s") < $tournament->getSolutionsDate()) {
2019-12-19 12:02:01 +00:00
echo "<div class=\"alert alert-danger\"><h4>Il est trop tôt pour se préoccuper des notes de synthèse, attendez le tirage des poules.</h4></div>";
require_once "server_files/views/footer.php";
2019-09-06 11:48:50 +00:00
}
2019-12-19 12:02:01 +00:00
if (isset($save_synthesis) && !$has_error) { ?>
<div class="alert alert-success">
Le fichier a été correctement envoyé !
</div>
<?php } ?>
2019-09-06 11:48:50 +00:00
2020-01-01 21:41:08 +00:00
<?php if (date("Y-m-d H:i:s") < $tournament->getSynthesesDate()) { ?>
2019-12-19 12:02:01 +00:00
<form method="post" enctype="multipart/form-data">
<input type="hidden" name="MAX_FILE_SIZE" value="5000000"/>
<div class="form-row">
<div class="form-group col-md-6">
<label for="dest">Destination de la note de synthèse :</label>
<select class="custom-select" id="dest" name="dest">
<option value="opposant">Opposant</option>
<option value="rapporteur">Rapporteur</option>
</select>
</div>
<div class="form-group col-md-6">
<label for="file">Fichier :</label>
<input class="form-control" type="file" id="file" name="synthese" />
</div>
</div>
<input class="btn btn-lg btn-primary btn-block" type="submit" name="send_synthesis" value="Envoyer" />
</form>
2019-09-06 11:48:50 +00:00
<?php } ?>
<div style="padding: 20px"></div>
<h2>Notes de synthèse soumises :</h2>
<?php
2019-09-07 23:35:05 +00:00
/** @var Synthesis $synthesis */
foreach ($syntheses as $synthesis) {
$file_id = $synthesis->getFileId();
$dest = $synthesis->getDest();
$version = $synthesis->getVersion();
2019-12-19 12:02:01 +00:00
echo "<div class=\"alert alert-info\"><strong>Note de synthèse pour " . ($dest == DestType::OPPOSANT ? "l'opposant" : "le rapporteur") . "</strong> (version $version) : <a href=\"/file/$file_id\">Télécharger</a></div>";
2019-09-07 23:35:05 +00:00
}
if ($team->isSelectedForFinal()) { ?>
<hr/>
<h2>Notes de synthèse soumises pour la finale :</h2>
<?php
/** @var Synthesis $sol */
foreach ($syntheses_final as $synthesis) {
$file_id = $synthesis->getFileId();
$dest = $synthesis->getDest();
$version = $synthesis->getVersion();
2019-12-19 12:02:01 +00:00
echo "<div class=\"alert alert-info\"><strong>Note de synthèse pour " . ($dest == DestType::OPPOSANT ? "l'opposant" : "le rapporteur") . "</strong> (version $version) : <a href=\"/file/$file_id\">Télécharger</a></div>";
2019-09-07 23:35:05 +00:00
}
2019-09-06 11:48:50 +00:00
}
require_once "footer.php";