Commit 860207e6 authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Merge branch 'master' of https://git.unicaen.fr/open-source/OSE

parents 2e5e2d62 013d4db3
Loading
Loading
Loading
Loading
+1 −1
Changes for module/Application/config/administration.config.php: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ return [
                                        'resource'   => PrivilegeController::getResourceId('Application\Controller\Autres', 'index'),
                                    ],
                                    'validation-volume-horaire-type-intervenant' => [
                                        'label'      => "Règles de validation par type d'intervenant",
                                        'label'      => "Règles de validation enseignements par type d'intervenant",
                                        'title'      => "Permet de définir les priorités de validation de volumes horaires par type d'intervenant",
                                        'route'      => 'validation-volume-horaire-type-intervenant',
                                        'withtarget' => true,
+2 −24
Changes for module/Application/src/Application/Controller/IntervenantController.php: 2 added lines, 24 removed lines.
Original line number Diff line number Diff line
@@ -87,6 +87,7 @@ class IntervenantController extends AbstractController
    public function rechercherAction()
    {
        $recents = $this->getIntervenantsRecents();
        $var     = '';

        return compact('recents');
    }
@@ -468,14 +469,7 @@ class IntervenantController extends AbstractController
    {
        $regleStructureValidation = $this->getEvent()->getParam('regleStructureValidation');
        $form                     = $this->getFormRegleStructureValidationSaisie();

        if (empty($regleStructureValidation)) {
            $title                    = 'Création d\'une nouvelle régle';
            $regleStructureValidation = $this->getServiceRegleStructureValidation()->newEntity();
        } else {
            $title = 'Édition d\'une règle';
        }

        $title                    = 'Édition de la régle de validation';
        $form->bindRequestSave($regleStructureValidation, $this->getRequest(), function (RegleStructureValidation $rsv) {
            try {
                $this->getServiceRegleStructureValidation()->save($rsv);
@@ -496,22 +490,6 @@ class IntervenantController extends AbstractController



    public function validationVolumeHoraireTypeIntervenantDeleteAction()
    {
        $regleStructureValidation = $this->getEvent()->getParam('regleStructureValidation');

        try {
            $this->getServiceRegleStructureValidation()->delete($regleStructureValidation);
            $this->flashMessenger()->addSuccessMessage("Règle supprimée avec succès.");
        } catch (\Exception $e) {
            $this->flashMessenger()->addErrorMessage($this->translate($e));
        }

        return new MessengerViewModel(compact('regleStructureValidation'));
    }



    /**
     *
     * @return array
+5 −1
Changes for module/Application/src/Application/Form/Intervenant/RegleStructureValidationForm.php: 5 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ class RegleStructureValidationForm extends AbstractForm
            'attributes' => [
                'class'            => 'selectpicker',
                'data-live-search' => 'false',
                'disabled'         => 'disabled',
            ],
            'type'       => 'Select',
        ]);
@@ -69,6 +70,7 @@ class RegleStructureValidationForm extends AbstractForm
            'attributes' => [
                'class'            => 'selectpicker',
                'data-live-search' => 'false',
                'disabled'         => 'disabled',
            ],
            'type'       => 'Select',
        ]);
@@ -80,7 +82,7 @@ class RegleStructureValidationForm extends AbstractForm
            'options'    => [
                'label'         => 'Priorité',
                'value_options' => [
                    'affection'    => 'Affectation',
                    'affectation'  => 'Affectation',
                    'enseignement' => 'Enseignement',
                ],
            ],
@@ -104,6 +106,8 @@ class RegleStructureValidationForm extends AbstractForm
        return $this;
    }



    /**
     * Should return an array specification compatible with
     * {@link Zend\InputFilter\Factory::createInputFilter()}.
+2 −21
Changes for module/Application/view/application/intervenant/validation-volume-horaire-type-intervenant.phtml: 2 added lines, 21 removed lines.
Original line number Diff line number Diff line
@@ -13,13 +13,13 @@ $canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::CENTRES_COUTS_
$canEdit = true;

?>
<h1 class="page-header">Règles de validation par type d'intervenant</h1>
<h1 class="page-header">Règles de validation enseignements par type d'intervenant</h1>
<table class="table table-bordered table-condensed table-hover">
    <thead>
    <tr>
        <th>Type Volume Horaire</th>
        <th>Type Intervenant</th>
        <th>Priorité</th>
        <th>Priorité composante</th>
        <th>Message</th>
        <?php if ($canEdit): ?>
            <th>Actions</th>
@@ -43,17 +43,6 @@ $canEdit = true;
                       href="<?= $this->url('validation-volume-horaire-type-intervenant/saisie', ['regleStructureValidation' => $rsv->getId()]) ?>"
                       data-submit-reload="true">
                        <span class="glyphicon glyphicon-edit"></span></a>
                    <a class="pop-ajax"
                       href="<?= $this->url('validation-volume-horaire-type-intervenant/delete', ['regleStructureValidation' => $rsv->getId()]) ?>"
                       title="Supprimer la règle de validation"
                       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-trash"></span>
                    </a>
                </td>
            <?php endif; ?>
        </tr>
@@ -61,14 +50,6 @@ $canEdit = true;
    </tbody>
</table>

<?php if ($canEdit): ?>
    <a class="btn btn-primary ajax-modal" data-event="validation-volume-horaire-type-intervenant-saisie"
       href="<?= $this->url('validation-volume-horaire-type-intervenant/saisie') ?>"
       title="Ajouter une règle de validation">
        <span class="glyphicon glyphicon-plus"></span>
        Ajouter une règle de validation</a>
<?php endif; ?>

<script type="text/javascript">
    $(function () {
        $("body").on("validation-volume-horaire-type-intervenant-saisie", function (event, data) {