Skip to content
Snippets Groups Projects
Select Git revision
  • 5ca90fec2cbf3e54a676e5c44a5a8a50f9eec0e4
  • master default protected
  • php84
  • detached7
  • detached6
  • detached5
  • detached
  • detached2
  • detached3
  • detached4
  • 4.x
  • origin/1.0.3
  • origin/1.0.2
  • 6.1.0
  • 6.0.6
  • 6.0.5
  • 6.0.4
  • 6.0.3
  • 6.0.2
  • 6.0.1
  • 6.0.0
  • 4.0.3
  • 4.0.2
  • 4.0.1
  • 4.0
  • 3.1.7
  • 3.1.6
  • 3.1.5
  • 3.1.4
  • 3.1.3
  • 3.1.2
  • 3.1.1
  • 3.1.0
33 results

Source.php

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 ?>