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

Merge branch 'flags#16809'

parents 24a7b0a1 a3933f94
Loading
Loading
Loading
Loading
Loading
−40
Changes for module/Application/src/Application/Entity/Db/Acteur.php: 0 added lines, 40 removed lines.
Original line number Diff line number Diff line
@@ -115,46 +115,6 @@ class Acteur implements HistoriqueAwareInterface, ResourceInterface

    }

    /**
     * @param Acteur[] $acteurs
     * @return bool
     * @deprecated
     */
    public static function estENSI($acteurs)
    {
        foreach ($acteurs as $acteur) {
            if (! $acteur->getEtablissement()) {
                continue;
            }
            $libelle = $acteur->getEtablissement()->getStructure()->getLibelle();
            if ($libelle === 'ENSI DE CAEN' || $libelle === '14 ENSI de Caen') {
                return true;
            }
        }

        return false;
    }

    /**
     * @param Acteur[] $acteurs
     * @return bool
     * @deprecated
     */
    public static function estESITC($acteurs)
    {
        foreach ($acteurs as $acteur) {
            if (! $acteur->getEtablissement()) {
                continue;
            }
            $libelle = $acteur->getEtablissement()->getStructure()->getLibelle();
            if ($libelle === 'ESITC' || $libelle === 'ESITC Caen') {
                return true;
            }
        }

        return false;
    }

    /**
     * @return string
     */
+10 −11
Changes for module/Application/src/Application/Service/Fichier/FichierService.php: 10 added lines, 11 removed lines.
Original line number Diff line number Diff line
@@ -553,17 +553,16 @@ class FichierService extends BaseService
        $membres = array_diff($acteurs, $rapporteurs, $directeurs);
        $informations["cotut-libelle"] = ($these->getLibelleEtabCotutelle())?($these->getLibelleEtabCotutelle()):"non";
        $informations["cotut-pays"]    = ($these->getLibellePaysCotutelle())?($these->getLibellePaysCotutelle()):"non";
//        $informations["logo-cotutelle"]    = ($these->getLibelleEtabCotutelle())?"":"non";
//        /** @var Etablissement $etabCotut */
//        $etabCotut = $this->getEtablissementService()->getRepository()->findOneByLibelle($informations["cotut-libelle"]);
//        if ($etabCotut) {
//            $logo = $etabCotut->getCheminLogo();
//            if ($logo) $informations["logo-cotutelle"] = $logo;
//        }

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

        $informations["avec-associe"] = "non";
        /** @var Acteur $directeur */
        foreach ($directeurs as $directeur) {
            if ($directeur->getEtablissement()->estAssocie()) {
                $informations["avec-associe"] = "oui";
                $informations["logo-associe"] = $directeur->getEtablissement()->getCheminLogo();
                $informations["titre"] .= $informations["logo-associe"];
            }
        }

        $informations["nombre de membres"]      = count($membres);
        $informations["nombre de rapporteurs"]  = count($rapporteurs)?count($rapporteurs):"";
+2 −2
Changes for module/Application/src/Application/Service/These/PageDeGarde/pagedecouverture.phtml: 2 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -150,9 +150,9 @@ $PATH = Structure::PATH;
            <?php endif; ?>
        </td>
        <!-- TODO ASSOCIE -->
        <?php if ($informations["logo-associe"] == "oui"): ?>
        <?php if ($informations["avec-associe"] == "oui"): ?>
            <td>
                <?php if ($informations["logo-cotutelle"]): ?>
                <?php if ($informations["logo-associe"]): ?>
                    <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>