Loading readme.md +0 −1 Original line number Diff line number Diff line Loading @@ -63,6 +63,5 @@ Par exemple pour les périmètres de structure 5 et 12 et de domaine 1 cette mé Améliorations ------------- 1. **PERIMÈTRE** Exposer plusieurs périmètres 1. **SECURITE** Verifier qu'il n'y est que des selects 1. **QoL** Coloration tinyMCE No newline at end of file src/UnicaenIndicateur/Controller/IndicateurController.php +2 −2 Original line number Diff line number Diff line Loading @@ -117,7 +117,6 @@ class IndicateurController extends AbstractActionController { $count = $this->getIndicateurService()->getCount($indicateur); $indicateur->setNbElements($count); $this->getIndicateurService()->update($indicateur); return $this->redirect()->toRoute('indicateur/afficher', ['indicateur' => $indicateur->getId()], [], true); } } Loading @@ -131,7 +130,7 @@ class IndicateurController extends AbstractActionController { return $vm; } public function modifierAction(): ViewModel public function modifierAction(): ViewModel|Response { $indicateur = $this->getIndicateurService()->getRequestedIndicateur($this); $namespace = $this->params()->fromQuery('namespace'); Loading @@ -153,6 +152,7 @@ class IndicateurController extends AbstractActionController { if ($form->isValid()) { $this->getIndicateurService()->update($indicateur); $this->getIndicateurService()->updateView($indicateur); return $this->redirect()->toRoute('indicateur/afficher', ['indicateur' => $indicateur->getId()], [], true); } } Loading src/UnicaenIndicateur/Service/TableauDeBord/TableauDeBordService.php +5 −18 Original line number Diff line number Diff line Loading @@ -4,7 +4,6 @@ namespace UnicaenIndicateur\Service\TableauDeBord; use Doctrine\ORM\EntityManager; use Doctrine\ORM\NonUniqueResultException; use Doctrine\ORM\ORMException; use Doctrine\ORM\QueryBuilder; use DoctrineModule\Persistence\ProvidesObjectManager; use Laminas\Mvc\Controller\AbstractActionController; Loading @@ -21,33 +20,21 @@ class TableauDeBordService { public function create(TableauDeBord $tableau) : TableauDeBord { try { $this->getObjectManager()->persist($tableau); $this->getObjectManager()->flush($tableau); } catch (ORMException $e) { throw new RuntimeException("Un problème est survenu en BD", 0 , $e); } return $tableau; } public function update(TableauDeBord $tableau) : TableauDeBord { try { $this->getObjectManager()->flush($tableau); } catch (ORMException $e) { throw new RuntimeException("Un problème est survenu en BD", 0 , $e); } return $tableau; } public function delete(TableauDeBord $tableau) : TableauDeBord { try { $this->getObjectManager()->remove($tableau); $this->getObjectManager()->flush($tableau); } catch (ORMException $e) { throw new RuntimeException("Un problème est survenu en BD", 0 , $e); } return $tableau; } Loading view/unicaen-indicateur/indicateur/index.phtml +1 −2 Original line number Diff line number Diff line Loading @@ -120,8 +120,7 @@ $canCategories = $this->isAllowed(IndicateurPrivileges::getResourceId(Indicateur <?php if ($canEditer): ?> <?php /** @see IndicateurController::modifierAction() */?> <a href="<?php echo $this->url("indicateur/modifier", ['indicateur' => $indicateur->getId()], [], true); ?>" class="ajax-modal" data-event="modification"> <a href="<?php echo $this->url("indicateur/modifier", ['indicateur' => $indicateur->getId()], [], true); ?>" > <span class="icon icon-editer" title="Modifier l'indicateur"></span></a> <?php else : ?> <span class="icon icon-editer" style="color:lightgray"></span> Loading Loading
readme.md +0 −1 Original line number Diff line number Diff line Loading @@ -63,6 +63,5 @@ Par exemple pour les périmètres de structure 5 et 12 et de domaine 1 cette mé Améliorations ------------- 1. **PERIMÈTRE** Exposer plusieurs périmètres 1. **SECURITE** Verifier qu'il n'y est que des selects 1. **QoL** Coloration tinyMCE No newline at end of file
src/UnicaenIndicateur/Controller/IndicateurController.php +2 −2 Original line number Diff line number Diff line Loading @@ -117,7 +117,6 @@ class IndicateurController extends AbstractActionController { $count = $this->getIndicateurService()->getCount($indicateur); $indicateur->setNbElements($count); $this->getIndicateurService()->update($indicateur); return $this->redirect()->toRoute('indicateur/afficher', ['indicateur' => $indicateur->getId()], [], true); } } Loading @@ -131,7 +130,7 @@ class IndicateurController extends AbstractActionController { return $vm; } public function modifierAction(): ViewModel public function modifierAction(): ViewModel|Response { $indicateur = $this->getIndicateurService()->getRequestedIndicateur($this); $namespace = $this->params()->fromQuery('namespace'); Loading @@ -153,6 +152,7 @@ class IndicateurController extends AbstractActionController { if ($form->isValid()) { $this->getIndicateurService()->update($indicateur); $this->getIndicateurService()->updateView($indicateur); return $this->redirect()->toRoute('indicateur/afficher', ['indicateur' => $indicateur->getId()], [], true); } } Loading
src/UnicaenIndicateur/Service/TableauDeBord/TableauDeBordService.php +5 −18 Original line number Diff line number Diff line Loading @@ -4,7 +4,6 @@ namespace UnicaenIndicateur\Service\TableauDeBord; use Doctrine\ORM\EntityManager; use Doctrine\ORM\NonUniqueResultException; use Doctrine\ORM\ORMException; use Doctrine\ORM\QueryBuilder; use DoctrineModule\Persistence\ProvidesObjectManager; use Laminas\Mvc\Controller\AbstractActionController; Loading @@ -21,33 +20,21 @@ class TableauDeBordService { public function create(TableauDeBord $tableau) : TableauDeBord { try { $this->getObjectManager()->persist($tableau); $this->getObjectManager()->flush($tableau); } catch (ORMException $e) { throw new RuntimeException("Un problème est survenu en BD", 0 , $e); } return $tableau; } public function update(TableauDeBord $tableau) : TableauDeBord { try { $this->getObjectManager()->flush($tableau); } catch (ORMException $e) { throw new RuntimeException("Un problème est survenu en BD", 0 , $e); } return $tableau; } public function delete(TableauDeBord $tableau) : TableauDeBord { try { $this->getObjectManager()->remove($tableau); $this->getObjectManager()->flush($tableau); } catch (ORMException $e) { throw new RuntimeException("Un problème est survenu en BD", 0 , $e); } return $tableau; } Loading
view/unicaen-indicateur/indicateur/index.phtml +1 −2 Original line number Diff line number Diff line Loading @@ -120,8 +120,7 @@ $canCategories = $this->isAllowed(IndicateurPrivileges::getResourceId(Indicateur <?php if ($canEditer): ?> <?php /** @see IndicateurController::modifierAction() */?> <a href="<?php echo $this->url("indicateur/modifier", ['indicateur' => $indicateur->getId()], [], true); ?>" class="ajax-modal" data-event="modification"> <a href="<?php echo $this->url("indicateur/modifier", ['indicateur' => $indicateur->getId()], [], true); ?>" > <span class="icon icon-editer" title="Modifier l'indicateur"></span></a> <?php else : ?> <span class="icon icon-editer" style="color:lightgray"></span> Loading