Commit 29940e6e authored by Jean-Philippe Metivier's avatar Jean-Philippe Metivier
Browse files

Preparation pour ESITC

parent 8cb9d1e8
Loading
Loading
Loading
Loading
+12
Changes for module/Application/src/Application/Controller/TheseController.php: 12 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -1456,6 +1456,18 @@ class TheseController extends AbstractController
        return false;
    }

    /** Vrai si un des acteurs à pour etablissement : '14 ENSI de Caen' ou 'ENSI DE CAEN'
     * @param Acteur[] $acteurs
     */
    public static function estESITC($acteurs) {
        foreach ($acteurs as $acteur) {
            if ($acteur->getEtablissement() == 'ESITC' || $acteur->getEtablissement() == 'ESITC Caen') {
                return true;
            }
        }
        return false;
    }

    /**
     * Prédicat testant si un acteur est un rapporteur de thèse
     * @param Acteur $var
+4 −1
Changes for module/Application/src/Application/Service/Fichier/FichierService.php: 4 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -550,7 +550,6 @@ 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))?"oui":"non";
        $informations["cotut-libelle"] = ($these->getLibelleEtabCotutelle())?($these->getLibelleEtabCotutelle()):"non";
        $informations["cotut-pays"]    = ($these->getLibellePaysCotutelle())?($these->getLibellePaysCotutelle()):"non";
        $informations["logo-cotutelle"]    = ($these->getLibelleEtabCotutelle())?"":"non";
@@ -563,6 +562,10 @@ class FichierService extends BaseService
            if ($logo) $informations["logo-cotutelle"] = $logo;
        }

        $informations["logo-associe"] = "non";
        if (TheseController::estENSI($directeurs))      $informations["logo-associe"] = "public/logo_ensi.jpg";
        if (TheseController::estESITC ($directeurs))    $informations["logo-associe"] = "public/logo_esitc.jpg";

        $informations["nombre de membres"] = count($membres)?count($membres):"";
        $informations["nombre de rapporteurs"] = count($rapporteurs)?count($rapporteurs):"";
        $informations["nombre de directeurs"] = count($directeurs)?count($directeurs):"";
+7 −4
Changes for module/Application/src/Application/Service/These/PageDeGarde/pagedecouverture.phtml: 7 added lines, 4 removed lines.
Original line number Diff line number Diff line
@@ -149,13 +149,16 @@ $PATH = Structure::PATH;
                <span style='background-color:red;'> Établissement d'inscription ou logo d'établissement non renseigné. </span>
            <?php endif; ?>
        </td>
        <!-- TODO ENSI -->
        <?php if ($informations["ENSI"] == "oui"): ?>
        <!-- TODO ASSOCIE -->
        <?php if ($informations["logo-associe"] == "oui"): ?>
            <td>
            <img class="logo_small" src="public/logo_ensi.jpg"/>
                <?php if ($informations["logo-cotutelle"]): ?>
                    <img class="logo_small" src="<?php echo $PATH . $informations["logo-associe"]; ?>"/>
                <?php else: ?>
                    <span style='background-color:red;'> Établissement associé ou logo d'établissement non renseigné. </span>
                <?php endif; ?>
            </td>
        <?php endif; ?>
        <!-- TODO COTUTELLE -->
        <?php if ($informations["cotut-libelle"] != "non"): ?>
            <td>
                <?php if ($informations["logo-cotutelle"]): ?>
+7.18 KiB
Loading image diff...