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

Ajout du survol du privilège pour les profils et des couleurs de colonne

parent a29028ba
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ class ProfilService {
    public function getProfils()
    {
        $qb = $this->getEntityManager()->getRepository(Profil::class)->createQueryBuilder('profil')
            ->orderBy('profil.libelle')
            ->orderBy('profil.structureType, profil.libelle')
        ;
        $result = $qb->getQuery()->getResult();
        return $result;
+18 −3
Original line number Diff line number Diff line
@@ -93,11 +93,11 @@ $canChangePrivilege = true;
        <tr>
            <th> <?php echo $privilege; ?> </th>
            <?php foreach ($profils as $profil) : ?>
                <td id="<?php echo $privilege->getId(); ?>_<?php echo $profil->getId();?>">
                <td class="<?php echo ($profil->getStructureType())?$profil->getStructureType()->getCode():"aucun"; ?>" id="<?php echo $privilege->getId(); ?>_<?php echo $profil->getId();?>">
                    <?php if ($profil->hasPrivilege($privilege)) : ?>
                        <span class="glyphicon glyphicon-ok text-success"></span>
                        <span class="glyphicon glyphicon-ok text-success" title="Cliquer pour retirer le privilège [<?php echo $privilege->getLibelle(); ?>] pour le profil [<?php echo $profil->getLibelle(); ?>]"></span>
                    <?php else: ?>
                        <span class="glyphicon glyphicon-remove text-danger"></span>
                        <span class="glyphicon glyphicon-remove text-danger" title="Cliquer pour ajouter le privilège [<?php echo $privilege->getLibelle(); ?>] pour le profil [<?php echo $profil->getLibelle(); ?>]"></span>
                    <?php endif; ?>
                </td>
            <?php endforeach; ?>
@@ -112,6 +112,21 @@ $canChangePrivilege = true;
        font-size:  small;
        background-color: lightblue;
    }

    td.aucun {
        background-color: lightgoldenrodyellow;
    }

    td.ecole-doctorale {
        background-color: #F1CEFF;
    }
    td.unite-recherche {
        background-color: #c8e7ff;
    }
    td.etablissement {
        background-color: #dcffe9;
    }

</style>

<script>