Commit 03ddcdfb authored by Laurent Lécluse's avatar Laurent Lécluse
Browse files

Bug corrigé sur la modif de types de modifs de serice dûs

parent 53f5b01a
......@@ -3,6 +3,13 @@ title: "Changements intervenus sur OSE"
author: Laurent Lécluse - DSI - Unicaen
---
# OSE 11
## Correction de bugs
* L'interface d'administration des motifs de modification de service est de nouveau pleinement fonctionelle.
# OSE 10-zf2 et 10-zf3
## Nouveautés
......
......@@ -13,16 +13,16 @@ return [
'options' => [
'route' => '/motif-modification-service',
'defaults' => [
'controller' => 'Application\Controller\MotifModificationService',
'action' => 'index',
'controller' => 'Application\Controller\MotifModificationService',
'action' => 'index',
],
],
'may_terminate' => true,
'child_routes' => [
'delete' => [
'delete' => [
'type' => 'Segment',
'options' => [
'route' => '/delete/:motif-modification-service',
'route' => '/delete/:motifModificationServiceDu',
'constraints' => [
'motif-modification-service' => '[0-9]*',
],
......@@ -34,7 +34,7 @@ return [
'saisie' => [
'type' => 'Segment',
'options' => [
'route' => '/saisie/[:motif-modification-service]',
'route' => '/saisie/[:motifModificationServiceDu]',
'constraints' => [
'motif-modification-service' => '[0-9]*',
],
......@@ -47,7 +47,7 @@ return [
],
],
],
'navigation' => [
'navigation' => [
'default' => [
'home' => [
'pages' => [
......@@ -66,7 +66,7 @@ return [
],
],
],
],
],
'bjyauthorize' => [
'guards' => [
PrivilegeController::class => [
......@@ -77,7 +77,7 @@ return [
],
[
'controller' => 'Application\Controller\MotifModificationService',
'action' => ['saisie','delete'],
'action' => ['saisie', 'delete'],
'privileges' => Privileges::MOTIFS_MODIFICATION_SERVICE_DU_EDITION,
],
],
......@@ -90,14 +90,14 @@ return [
],
'service_manager' => [
'invokables' => [
Service\MotifModificationServiceService::class => Service\MotifModificationServiceService::class,
Service\MotifModificationServiceService::class => Service\MotifModificationServiceService::class,
],
],
'view_helpers' => [
],
'form_elements' => [
'invokables' => [
Form\MotifModificationService\MotifModificationServiceSaisieForm::class => Form\MotifModificationService\MotifModificationServiceSaisieForm::class,
Form\MotifModificationService\MotifModificationServiceSaisieForm::class => Form\MotifModificationService\MotifModificationServiceSaisieForm::class,
],
],
];
......@@ -31,11 +31,11 @@ class MotifModificationServiceController extends AbstractController
{
/* @var $motifModificationService MotifModificationServiceDu */
$motifModificationServiceDu = $this->getEvent()->getParam('motif-modification-service');
$motifModificationServiceDu = $this->getEvent()->getParam('motifModificationServiceDu');
$form = $this->getFormMotifModificationServiceSaisie();
if (empty($motifModificationServiceDu)) {
$title = 'Création d\'un nouveau motif de modification de service dû';
$title = 'Création d\'un nouveau motif de modification de service dû';
$motifModificationServiceDu = $this->getServiceMotifModificationService()->newEntity();
} else {
$title = 'Édition d\'un motif de modification de service dû';
......@@ -57,7 +57,7 @@ class MotifModificationServiceController extends AbstractController
public function deleteAction()
{
$motifModificationServiceDu = $this->getEvent()->getParam('motif-modification-service');
$motifModificationServiceDu = $this->getEvent()->getParam('motifModificationServiceDu');
try {
$this->getServiceMotifModificationService()->delete($motifModificationServiceDu);
......@@ -66,6 +66,6 @@ class MotifModificationServiceController extends AbstractController
$this->flashMessenger()->addErrorMessage(DbException::translate($e)->getMessage());
}
return new MessengerViewModel(compact('motifModificationService'));
return new MessengerViewModel();
}
}
<?php
/**
* @var $this \Application\View\Renderer\PhpRenderer
* @var $this \Application\View\Renderer\PhpRenderer
* @var $motifModificationServices \Application\Entity\Db\MotifModificationService[]
*/
......@@ -17,47 +17,50 @@ $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>
<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 ; " title="Le dépassement du service dû ne donnera pas lieu à des heures complémentaires (comme par exemple pour une décharge)">Pas d'heures complémentaires</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): ?>
<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 ; "
title="Le dépassement du service dû ne donnera pas lieu à des heures complémentaires (comme par exemple pour une décharge)">
Pas d'heures complémentaires
</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', ['motifModificationServiceDu' => $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', ['motifModificationServiceDu' => $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û">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment