mirror of
				https://gitlab.com/animath/si/plateforme-corres2math.git
				synced 2025-11-04 16:42:33 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			100 lines
		
	
	
		
			4.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			100 lines
		
	
	
		
			4.1 KiB
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php require_once "header.php" ?>
 | 
						|
 | 
						|
    <div class="mt-4 mb-4">
 | 
						|
        <h1 class="display-4">Informations sur l'équipe</h1>
 | 
						|
    </div>
 | 
						|
 | 
						|
    <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-<?= $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
 | 
						|
		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">
 | 
						|
        <strong>Autorise Animath à diffuser les vidéos :</strong> <?= $team->allowPublish() ? "oui" : "non" ?>
 | 
						|
    </div>
 | 
						|
 | 
						|
<?php
 | 
						|
if ($_SESSION["role"] == Role::ADMIN) { ?>
 | 
						|
    <hr/>
 | 
						|
	<? if ($team->getValidationStatus() == ValidationStatus::VALIDATED) { ?>
 | 
						|
        <form method="POST">
 | 
						|
            <div class="form-group row">
 | 
						|
                <div class="form-group col-md-12">
 | 
						|
                    <label for="other_teams">L'équipe va recevoir les questions des équipes suivantes (merci d'en
 | 
						|
                        sélectionner
 | 
						|
                        exactement 2) :</label>
 | 
						|
                    <select class="custom-select" id="other_teams" name="other_teams[]" multiple <?= Phase::getCurrentPhase() >= Phase::PHASE2 ? "disable" : "" ?>>
 | 
						|
						<?php
 | 
						|
						/** @var Team $other_team */
 | 
						|
						foreach ($other_teams as $other_team) {
 | 
						|
							if ($other_team->getId() == $team->getId())
 | 
						|
								continue;
 | 
						|
 | 
						|
							$team_name = $other_team->getName() . " (" . $other_team->getTrigram() . ")";
 | 
						|
							$team_id = $other_team->getId();
 | 
						|
							echo "<option value=\"$team_id\" " . (in_array($other_team->getId(), $team->getVideoTeamIds()) ? "selected" : "") . ">$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="update_video_teams"
 | 
						|
                           value="Mettre à jour"/>
 | 
						|
                <?php } ?>
 | 
						|
            </div>
 | 
						|
        </form>
 | 
						|
	<?php } ?>
 | 
						|
<?php } ?>
 | 
						|
 | 
						|
    <hr/>
 | 
						|
 | 
						|
    <h2>Autorisations</h2>
 | 
						|
 | 
						|
<?php printDocuments($documents) ?>
 | 
						|
 | 
						|
    <form method="POST">
 | 
						|
        <input type="submit" class="btn btn-secondary btn-lg btn-block" name="download_zip"
 | 
						|
               value="Télécharger l'archive"/>
 | 
						|
    </form>
 | 
						|
 | 
						|
<?php if ($team->getValidationStatus() == ValidationStatus::WAITING && $_SESSION["role"] == Role::ADMIN) { ?>
 | 
						|
    <hr/>
 | 
						|
    <form method="POST">
 | 
						|
        <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
 | 
						|
}
 | 
						|
 | 
						|
require_once "footer.php" ?>
 |