Commit 386af1b4 authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Merge branch 'master' into FixPDC

parents 0e94c86e a5f4a826
Loading
Loading
Loading
Loading
+12
Changes for module/Application/src/Application/Filter/ActeursFormatter.php: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -28,11 +28,13 @@ class ActeursFormatter extends AbstractFilter {
    private $separator;

    private $displayRole = false;
    private $displayRoleLibelle = false;
    private $displayRoleComplement = false;
    private $displayQualite = false;
    private $displayEtablissement = false;

    private $contrainteRole = null;
    private $contrainteRoleLibelle = null;
    private $contrainteRoleComplement = null;
    private $contrainteQualite = null;
    private $contrainteEtablissement = null;
@@ -86,6 +88,8 @@ class ActeursFormatter extends AbstractFilter {
            switch ($key) {
                case "role": $this->displayRole = $value;
                    break;
                case "roleLibelle": $this->displayRoleLibelle = $value;
                    break;
                case "complement": $this->displayRoleComplement = $value;
                    break;
                case "qualite": $this->displayQualite = $value;
@@ -188,6 +192,8 @@ class ActeursFormatter extends AbstractFilter {
            switch ($key) {
                case "role": $this->contrainteRole = $value;
                    break;
                    case "roleLibelle": $this->contrainteRoleLibelle = $value;
                    break;
                case "complement": $this->contrainteRoleComplement = $value;
                    break;
                case "qualite": $this->contrainteQualite = $value;
@@ -207,8 +213,14 @@ class ActeursFormatter extends AbstractFilter {

        /** @var Acteur $acteur */
        foreach($acteurs as $acteur) {

            $acteurRole = $acteur->getRole()->getCode();
            $acteurNom  = $acteur->getIndividu()->getNomComplet();


            $keep = true;
            if ($keep && $this->contrainteRole != null && $acteur->getRole()->getCode() != $this->contrainteRole) $keep = false;
            if ($keep && $this->contrainteRoleLibelle != null && $acteur->getRole()->getLibelle() != $this->contrainteRoleLibelle) $keep = false;
            if ($keep && $this->contrainteRoleComplement != null && $acteur->getLibelleRoleComplement() != $this->contrainteRoleComplement) $keep = false;
            if ($keep && $this->contrainteQualite != null && $acteur->getQualite() != $this->contrainteQualite) $keep = false;
            if ($keep && $this->contrainteEtablissement != null && $acteur->getEtablissement() != $this->contrainteEtablissement) $keep = false;
+1 −1
Changes for module/Application/src/Application/Service/Fichier/FichierService.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -549,7 +549,7 @@ class FichierService extends BaseService
        $rapporteurs =  array_filter($acteurs, function($a) {return TheseController::estRapporteur($a); });
        $directeurs =  array_filter($acteurs, function($a) {return TheseController::estDirecteur($a); });
        $membres = array_diff($acteurs, $rapporteurs, $directeurs);
        $informations["ENSI"] = TheseController::estENSI($directeurs);
        $informations["ENSI"] = (TheseController::estENSI($directeurs))?"oui":"non";

        $informations["nombre de membres"] = count($membres)?count($membres):"";
        $informations["nombre de rapporteurs"] = count($rapporteurs)?count($rapporteurs):"";
+1 −1
Changes for module/Application/src/Application/Service/These/PageDeGarde/pagedecouverture.phtml: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -147,7 +147,7 @@ $PATH = Structure::PATH;
            <?php endif; ?>
        </td>
        <!-- TODO ENSI -->
        <?php if ($informations["ENSI"]): ?>
        <?php if ($informations["ENSI"] == "oui"): ?>
        <td>
            <img class="logo_small" src="public/logo_ensi.jpg"/>
        </td>
+8 −4
Changes for module/Application/view/application/these/partial/fiche.phtml: 8 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -24,12 +24,15 @@ $acteursFormatter = new ActeursFormatter();
    </tr>

    <?php if ($these->getActeurs()->count()) {
            $roles = ["Directeur de thèse", "Membre du jury", "Rapporteur du jury"];
            $roles = ["Directeur de thèse", "Co-directeur de thèse", "Membre du jury", "Rapporteur du jury"];
//            $roles = ["D", "K", "M", "R"];
            foreach ($roles as $role) {
                $acteursFormatter->asArray()->paramFilter(["roleLibelle" => $role,]);
                $acteurs = $acteursFormatter->filter($these->getActeurs());

                if (count($acteurs) != 0) {
                    echo "<tr>";
                    echo "<th>" . $role . "</th>";
                $acteursFormatter->asArray()->paramFilter(["role" => $role,]);
                $acteurs = $acteursFormatter->filter($these->getActeurs());
                    echo "<td>";
                    if (count($acteurs) == 0) echo "(Inconnus)";
                    else echo implode("<br>", $acteurs);
@@ -37,6 +40,7 @@ $acteursFormatter = new ActeursFormatter();
                    echo "</tr>";
                }
            }
        }
    ?>

    <tr>
@@ -56,7 +60,7 @@ $acteursFormatter = new ActeursFormatter();
        <th>École doct.</th>
        <td>
            <?php if ($these->getEcoleDoctorale()): ?>
                <?php echo $these->getEcoleDoctorale()->getSourceCode() . " - " . $these->getEcoleDoctorale()->getLibelle() ?>
                <?php echo $these->getEcoleDoctorale()->getSigle() . " - " . $these->getEcoleDoctorale()->getLibelle() ?>
            <?php endif ?>
        </td>
    </tr>