Skip to content
Snippets Groups Projects
Select Git revision
  • e6d5c92bfc5595b54b2860b51de3e5c699abed55
  • master default protected
  • b24
  • ll-workflow
  • alc-scindage-donnees-pj
  • FJ_LL_Tbl_Contrat
  • alc-docker-node
  • ll-apiplatform
  • php84
  • ll-rgpd
  • b23
  • alc-filtre-type-intervenant
  • ll-sans-mdb5
  • formules-ancienne-infra
  • ll-formules
  • alc-intervenant-dmep
  • ll-suppr-v_vol-s
  • b20
  • ll-postgresql
  • b23.0.1
  • b22
  • 24.8
  • 24.7
  • 24.6
  • 24.5
  • 24.4
  • 24.3
  • 24.2
  • 24.1
  • 24.0
  • 23.15
  • 24.0-beta19
  • 24.0-beta18
  • 24.0-beta17
  • 24.0-beta16
  • 24.0-beta15
  • 24.0-beta14
  • 24.0-beta13
  • 23.14
  • 24.0-beta12
  • 24.0-beta11
41 results

index.phtml

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    index.phtml 3.48 KiB
    <?php
    /**
     * @var $this \Application\View\Renderer\PhpRenderer
     * @var $motifModificationServices \Application\Entity\Db\MotifModificationService[]
     */
    
    use Application\Provider\Privilege\Privileges;
    
    function affBooleen($flg)
    {
        // affiche booléen avec des glypheIcon
        return ($flg ? '<span class="glyphicon glyphicon-ok text-success"></span>' : '<span class="glyphicon glyphicon-remove text-danger refuse"></span>');
    }
    
    $this->headTitle()->append("Motifs de modification de service dû");
    
    $canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::MOTIFS_MODIFICATION_SERVICE_DU_EDITION));
    
    ?>
        <h1 class="page-header">Motifs de modification de service dû</h1>
    
        <table class="table table-bordered table-sort">
            <thead>
                        <th style="word-wrap: break-word ; ">Code</th>
                        <th style="word-wrap: break-word ; ">Libelle</th>
                        <th style="word-wrap: break-word ; ">Multiplicateur</th>
                        <th style="word-wrap: break-word ; ">Décharge</th>
    <?php if ($canEdit) echo '<th>Actions</th>' ?>
            </thead>
            <tbody>
            <?php foreach ($motifModificationServices as $fr): ?>
                <tr>
                         <td style="word-wrap: break-word ; "><?= $fr->getCode() ?></td>
                         <td style="word-wrap: break-word ; "><?= $fr->getLibelle() ?></td>
                         <td style="word-wrap: break-word ; "><?= $fr->getMultiplicateur() ?></td>
                         <td style="word-wrap: break-word ; "><?= affBooleen($fr->getDecharge()) ?></td>
                        <?php if ($canEdit) { ?>
                        <td style="text-align:center;width:1px;white-space: nowrap">
                            <a class="ajax-modal" data-event="motif-modification-service-saisie"
                               href="<?= $this->url('motif-modification-service/saisie', ['motif-modification-service' => $fr->getId()]) ?>"
                               title="Modifier le Motif de Modificationde Service dû">
                                <span class="glyphicon glyphicon-edit"></span></a>
                            <a class="pop-ajax"
                               href="<?= $this->url('motif-modification-service/delete', ['motif-modification-service' => $fr->getId()]) ?>"
                               title="Supprimer le Motif de Modificationde Service dû"
                               data-content="<p class='lead text-danger'><strong>Attention!</strong> Confirmez-vous cette suppression ?</p>"
                               data-confirm="true"
                               data-confirm-button="Oui"
                               data-cancel-button="Non"
                               data-submit-reload="true"
                            >
                                <span class="glyphicon glyphicon-remove"></span>
                            </a>
                        </td>
                    <?php } ?>
                </tr>
            <?php endforeach; ?>
            </tbody>
        </table>
        <?php if ($canEdit): ?>
        <a class="btn btn-primary ajax-modal" data-event="motif-modification-service-saisie"
           href="<?= $this->url('motif-modification-service/saisie') ?>"
           title="Ajouter un motif de modification du service dû">
            <span class="glyphicon glyphicon-edit"></span>
            Ajouter un motif de modification du service dû</a>
    
        <script type="text/javascript">
            $(function () {
                $("body").on("motif-modification-service-saisie", function (event, data) {
                    window.location.reload();
                });
            });
        </script>
    <?php endif ?>