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

Merge branch 'hotfix_libelle_ur' into develop

parents 71c49b34 61c01353
Loading
Loading
Loading
Loading
+2 −1
Changes for module/Application/src/Application/Provider/IdentityProvider.php: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -120,11 +120,12 @@ class IdentityProvider implements ProviderInterface, ChainableProvider
        $acteurs = $this->acteurService->findAllActeursByUser($this->userWrapper);

        $acteursDirecteurThese = $this->acteurService->filterActeursDirecteurThese($acteurs);
        $acteursCoDirecteurThese = $this->acteurService->filterActeursCoDirecteurThese($acteurs);
        $acteursPresidentJury = $this->acteurService->filterActeursPresidentJury($acteurs);

        return array_map(
            function(Acteur $a) { return $a->getRole(); },
            array_merge($acteursDirecteurThese, $acteursPresidentJury)
            array_merge($acteursDirecteurThese, $acteursPresidentJury, $acteursCoDirecteurThese)
        );
    }

+11 −0
Changes for module/Application/src/Application/Service/Acteur/ActeurService.php: 11 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -79,6 +79,17 @@ class ActeurService extends BaseService
        });
    }

    /**
     * @param Acteur[] $acteurs
     * @return Acteur[]
     */
    public function filterActeursCoDirecteurThese(array $acteurs): array
    {
        return array_filter($acteurs, function(Acteur $a) {
            return $a->getRole()->getCode() === Role::CODE_CODIRECTEUR_THESE;
        });
    }

    /**
     * @param Individu $individu
     * @return Acteur[]
+8 −2
Changes for module/Soutenance/view/soutenance/index/index-structure.phtml: 8 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
use Application\Entity\Db\EcoleDoctorale;
use Application\Entity\Db\Etablissement;
use Application\Entity\Db\Role;
use Application\Entity\Db\These;
use Application\Entity\Db\UniteRecherche;
use Application\Provider\Privilege\ThesePrivileges;
use Soutenance\Entity\Proposition;
@@ -59,6 +60,11 @@ $canSuppression = ($role->getCode() === Role::CODE_ADMIN_TECH);
    </thead>
    <tbody>
        <?php foreach ($propositions as $proposition) : ?>
            <?php
                /** @var These $these **/
                $these = $proposition->getThese();
                $unite = $these->getUniteRecherche();
            ?>
            <tr>
                <td>
                    <?php if ($canVoirThese) : ?>
@@ -91,9 +97,9 @@ $canSuppression = ($role->getCode() === Role::CODE_ADMIN_TECH);
                        <?php echo $proposition->getThese()->getEcoleDoctorale()->getLibelle(); ?>
                    </span> <br/>
                    <span class="structure unite-recherche"
                          title="Unité de recherche : <?php echo $proposition->getThese()->getUniteRecherche()->getLibelle(); ?> (<?php echo $proposition->getThese()->getUniteRecherche()->getSigle(); ?>)"
                          title="Unité de recherche : <?php echo ($unite)?$unite->getLibelle():$these->getLibelleUniteRecherche(); ?> <?php echo ($unite)?"(".$unite->getSigle() .")":""; ?>"
                    >
                        <?php echo $proposition->getThese()->getUniteRecherche()->getLibelle(); ?>
                        <?php echo ($unite)?$unite->getLibelle():"<span style='background:lightsalmon;'><strong>".$these->getLibelleUniteRecherche()."</strong></span>"; ?>
                    </span>
                </td>
                <td>