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

ajustement css pour les index

parent 45fc7aa5
Loading
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -19,9 +19,15 @@ class LienController extends AbstractActionController {
    public function indexAction() : ViewModel
    {
        $liens = $this->getLienService()->getLiens();
        $roles_ = $this->getRoleService()->getRepo()->findAll();
        $roles = [];
        foreach ($roles_ as $role) {
            $roles[$role->getId()] = $role;
        }

        return new ViewModel([
            'liens' => $liens,
            'roles' => $roles,
        ]);
    }

+1 −0
Original line number Diff line number Diff line
@@ -86,6 +86,7 @@ class DocumentationLien {
        $this->historisee = $historisee;
    }


    public function getRoles() : array
    {
        if ($this->roles === null) return [];
+36 −11
Original line number Diff line number Diff line
@@ -2,10 +2,12 @@

use UnicaenAide\Entity\Db\DocumentationLien;
use UnicaenAide\Provider\Privilege\UnicaenaidedocumentationPrivileges;
use UnicaenUtilisateur\Entity\Db\Role;

/**
 * @see \UnicaenAide\Controller\Documentation\LienController::indexAction()
 * @var DocumentationLien[] $liens
 * @var Role[] $roles
 */

$this->headTitle("Documentation");
@@ -34,8 +36,9 @@ $canSupprimer = $this->isAllowed(UnicaenaidedocumentationPrivileges::getResour
    <thead>
        <tr>
            <th> Lien </th>
            <th style="width: 8rem;"> Ordre </th>
            <th style="width: 8rem;"> Action </th>
            <th> Rôle·s autorisé·s </th>
            <th> Ordre </th>
            <th class="action"> Action </th>
        </tr>
    </thead>
    <tbody>
@@ -50,38 +53,60 @@ $canSupprimer = $this->isAllowed(UnicaenaidedocumentationPrivileges::getResour
                    <a href="<?php echo $lien->getLienUrl(); ?>"><?php echo $lien->getLienTexte(); ?></a>
                    <br/> Adresse de la documentation : <?php echo $lien->getLienUrl(); ?>
                </td>
                <td> <?php echo $lien->getOrdre(); ?> </td>
                <td>
                    <ul>
                    <?php foreach ($lien->getRoles() as $role) : ?>
                        <li> <?php echo ($roles[$role])?$roles[$role]->getLibelle():"Rôle inconnu"; ?> </li>
                    <?php endforeach; ?>
                    </ul>
                </td>
                <td> <?php echo $lien->getOrdre(); ?> </td>
                <td class="action">
                    <?php if ($canAfficher) : ?>
                        <a  <?php /** @see \UnicaenAide\Controller\Documentation\LienController::afficherAction() */?>
                                href="<?php echo $this->url('unicaen-aide/documentation/lien/afficher', ['lien' => $lien->getId()], [], true); ?>"
                                class="ajax-modal" >
                            <span class="icon icon-voir"></span></a>
                                class="ajax-modal action secondary" >
                            <span class="icon icon-voir"></span>
                            Visualiser
                        </a>
                    <?php endif; ?>
                    <?php if($canModifier) : ?>
                        <br>
                        <a  <?php /** @see \UnicaenAide\Controller\Documentation\LienController::modifierAction() */?>
                                href="<?php echo $this->url('unicaen-aide/documentation/lien/modifier', ['lien' => $lien->getId()], [], true); ?>"
                                class="ajax-modal" data-event="modification">
                            <span class="icon icon-editer"></span></a>
                                class="ajax-modal action primary" data-event="modification">
                            <span class="icon icon-editer"></span>
                            Modifier
                        </a>
                    <?php endif; ?>
                    <?php if($canHistoriser) : ?>
                        <br>
                        <?php if ($lien->estNonHistorise()) : ?>
                            <a  <?php /** @see \UnicaenAide\Controller\Documentation\LienController::historiserAction() */?>
                                    href="<?php echo $this->url('unicaen-aide/documentation/lien/historiser', ['lien' => $lien->getId()], [], true); ?>"
                                    class="action warning"
                            >
                                <span class="icon icon-historiser"></span></a>
                                <span class="icon icon-historiser"></span>
                                Historiser
                            </a>
                        <?php else : ?>
                            <a  <?php /** @see \UnicaenAide\Controller\Documentation\LienController::restaurerAction() */?>
                                    href="<?php echo $this->url('unicaen-aide/documentation/lien/restaurer', ['lien' => $lien->getId()], [], true); ?>"
                                    class="action warning"
                            >
                                <span class="icon icon-restaurer"></span></a>
                                <span class="icon icon-restaurer"></span>
                                Restaurer
                            </a>
                        <?php endif; ?>
                    <?php endif; ?>
                    <?php if($canSupprimer) : ?>
                        <br>
                        <a  <?php /** @see \UnicaenAide\Controller\Documentation\LienController::supprimerAction() */?>
                                href="<?php echo $this->url('unicaen-aide/documentation/lien/supprimer', ['lien' => $lien->getId()], [], true); ?>"
                                class="ajax-modal" data-event="modification">
                            <span class="icon icon-retirer"></span></a>
                                class="ajax-modal action danger" data-event="modification">
                            <span class="icon icon-unchecked"></span>
                            Supprimer
                        </a>
                    <?php endif; ?>
                </td>
            </tr>
+26 −11
Original line number Diff line number Diff line
@@ -34,8 +34,8 @@ $canSupprimer = $this->isAllowed(UnicaenaidefaqPrivileges::getResourceId(Unica
    <thead>
        <tr>
            <th> Question </th>
            <th style="width: 8rem;"> Ordre </th>
            <th style="width: 8rem;"> Action </th>
            <th> Ordre </th>
            <th class="action"> Action </th>
        </tr>
    </thead>
    <tbody>
@@ -46,37 +46,52 @@ $canSupprimer = $this->isAllowed(UnicaenaidefaqPrivileges::getResourceId(Unica
                    <span class="reponse"> <?php echo $question->getReponse(); ?></span>
                </td>
                <td> <?php echo $question->getOrdre(); ?> </td>
                <td>
                <td class="action">
                    <?php if ($canAfficher) : ?>
                        <a  <?php /** @see \UnicaenAide\Controller\Faq\QuestionController::afficherAction() */?>
                                href="<?php echo $this->url('unicaen-aide/faq/question/afficher', ['question' => $question->getId()], [], true); ?>"
                                class="ajax-modal" >
                            <span class="icon icon-voir"></span></a>
                                class="ajax-modal action secondary">
                            <span class="icon icon-voir"></span>
                            Visualiser
                        </a>
                    <?php endif; ?>
                    <?php if($canModifier) : ?>
                        <br>
                        <a  <?php /** @see \UnicaenAide\Controller\Faq\QuestionController::modifierAction() */?>
                                href="<?php echo $this->url('unicaen-aide/faq/question/modifier', ['question' => $question->getId()], [], true); ?>"
                                class="ajax-modal" data-event="modification">
                            <span class="icon icon-editer"></span></a>
                                class="ajax-modal action primary" data-event="modification">
                            <span class="icon icon-editer"></span>
                            Modifier
                        </a>
                    <?php endif; ?>
                    <?php if($canHistoriser) : ?>
                        <br>
                        <?php if ($question->estNonHistorise()) : ?>
                            <a  <?php /** @see \UnicaenAide\Controller\Faq\QuestionController::historiserAction() */?>
                                    href="<?php echo $this->url('unicaen-aide/faq/question/historiser', ['question' => $question->getId()], [], true); ?>"
                                    class="action warning"
                            >
                                <span class="icon icon-historiser"></span></a>
                                <span class="icon icon-historiser"></span>
                                Historiser
                            </a>
                        <?php else : ?>
                            <a  <?php /** @see \UnicaenAide\Controller\Faq\QuestionController::restaurerAction() */?>
                                    href="<?php echo $this->url('unicaen-aide/faq/question/restaurer', ['question' => $question->getId()], [], true); ?>"
                                    class="action warning"
                            >
                                <span class="icon icon-restaurer"></span></a>
                                <span class="icon icon-restaurer"></span>
                                Restaurer
                            </a>
                        <?php endif; ?>
                    <?php endif; ?>
                    <?php if($canSupprimer) : ?>
                        <br>
                        <a  <?php /** @see \UnicaenAide\Controller\Faq\QuestionController::supprimerAction() */?>
                                href="<?php echo $this->url('unicaen-aide/faq/question/supprimer', ['question' => $question->getId()], [], true); ?>"
                                class="ajax-modal" data-event="modification">
                            <span class="icon icon-retirer"></span></a>
                                class="ajax-modal action danger" data-event="modification">
                            <span class="icon icon-unchecked"></span>
                            Supprimer
                        </a>
                    <?php endif; ?>
                </td>
            </tr>
+25 −10
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ $canSupprimer = $this->isAllowed(UnicaenaideglossairePrivileges::getResourceId
        <tr>
            <th> Terme </th>
            <th> Définition </th>
            <th style="width: 8rem;"> Action </th>
            <th class="action"> Action </th>
        </tr>
    </thead>
    <tbody>
@@ -59,37 +59,52 @@ $canSupprimer = $this->isAllowed(UnicaenaideglossairePrivileges::getResourceId
                        <?php endforeach; ?>
                    <?php endif; ?>
                </td>
                <td>
                <td class="action">
                    <?php if ($canAfficher) : ?>
                        <a  <?php /** @see \UnicaenAide\Controller\Glossaire\DefinitionController::afficherAction() */?>
                                href="<?php echo $this->url('unicaen-aide/glossaire/definition/afficher', ['definition' => $definition->getId()], [], true); ?>"
                                class="ajax-modal" >
                            <span class="icon icon-voir"></span></a>
                                class="ajax-modal action secondary" >
                            <span class="icon icon-voir"></span>
                            Visualiser
                        </a>
                    <?php endif; ?>
                    <?php if($canModifier) : ?>
                    <br>
                        <a  <?php /** @see \UnicaenAide\Controller\Glossaire\DefinitionController::modifierAction() */?>
                                href="<?php echo $this->url('unicaen-aide/glossaire/definition/modifier', ['definition' => $definition->getId()], [], true); ?>"
                                class="ajax-modal" data-event="modification">
                            <span class="icon icon-editer"></span></a>
                                class="ajax-modal action primary" data-event="modification">
                            <span class="icon icon-editer"></span>
                            Modifier
                        </a>
                    <?php endif; ?>
                    <?php if($canHistoriser) : ?>
                        <br>
                        <?php if ($definition->estNonHistorise()) : ?>
                            <a  <?php /** @see \UnicaenAide\Controller\Glossaire\DefinitionController::historiserAction() */?>
                                    href="<?php echo $this->url('unicaen-aide/glossaire/definition/historiser', ['definition' => $definition->getId()], [], true); ?>"
                                    class="action warning"
                            >
                                <span class="icon icon-historiser"></span></a>
                                <span class="icon icon-historiser"></span>
                                Historiser
                            </a>
                        <?php else : ?>
                            <a  <?php /** @see \UnicaenAide\Controller\Glossaire\DefinitionController::restaurerAction() */?>
                                    href="<?php echo $this->url('unicaen-aide/glossaire/definition/restaurer', ['definition' => $definition->getId()], [], true); ?>"
                                    class="action warning"
                            >
                                <span class="icon icon-restaurer"></span></a>
                                <span class="icon icon-restaurer"></span>
                                Restaurer
                            </a>
                        <?php endif; ?>
                    <?php endif; ?>
                    <?php if($canSupprimer) : ?>
                        <br>
                        <a  <?php /** @see \UnicaenAide\Controller\Glossaire\DefinitionController::supprimerAction() */?>
                                href="<?php echo $this->url('unicaen-aide/glossaire/definition/supprimer', ['definition' => $definition->getId()], [], true); ?>"
                                class="ajax-modal" data-event="modification">
                            <span class="icon icon-retirer"></span></a>
                                class="ajax-modal action danger" data-event="modification">
                            <span class="icon icon-unchecked"></span>
                            Supprimer
                        </a>
                    <?php endif; ?>
                </td>
            </tr>