Loading src/UnicaenIndicateur/Controller/IndicateurController.php +4 −3 Original line number Diff line number Diff line Loading @@ -66,10 +66,10 @@ class IndicateurController extends AbstractActionController { public function creerAction() : ViewModel { $indicateur = new Indicateur(); $namespace = $this->params()->fromQuery('namespace'); $form = $this->getIndicateurForm(); $form->setAttribute('action', $this->url()->fromRoute('indicateur/creer', [], ['query' => ['namespace' => $namespace]], true)); $namespace = $this->params()->fromQuery('namespace'); if ($namespace) { $indicateur->setNamespace($namespace); $form->get('namespace')->setAttribute('readonly', true); Loading Loading @@ -100,9 +100,10 @@ class IndicateurController extends AbstractActionController { public function modifierAction(): ViewModel { $indicateur = $this->getIndicateurService()->getRequestedIndicateur($this); $form = $this->getIndicateurForm(); $form->setAttribute('action', $this->url()->fromRoute('indicateur/modifier', [], [], true)); $namespace = $this->params()->fromQuery('namespace'); $form = $this->getIndicateurForm(); $form->setAttribute('action', $this->url()->fromRoute('indicateur/modifier', ['indicateur' => $indicateur], ['query' => ['namespace' => $namespace]], true)); if ($namespace) { $indicateur->setNamespace($namespace); $form->get('namespace')->setAttribute('readonly', true); Loading src/UnicaenIndicateur/Controller/TableauDeBordController.php +13 −4 Original line number Diff line number Diff line Loading @@ -28,22 +28,26 @@ class TableauDeBordController extends AbstractActionController public function afficherAction() : ViewModel { $tableau = $this->getTableauDeBordService()->getRequestedTableauDeBord($this); $retour = $this->params()->fromQuery('retour'); return new ViewModel([ 'tableau' => $tableau, 'indicateurService' => $this->getIndicateurService(), 'retour' => $retour, ]); } public function ajouterAction() : ViewModel { $tableau = new TableauDeBord(); $namespace = $this->params()->fromQuery('namespace'); if ($namespace) $tableau->setNamespace($namespace); $form = $this->getTableauDeBordForm(); $form->setAttribute('action', $this->url()->fromRoute('tableau-de-bord/ajouter', [], [], true)); $form->setAttribute('action', $this->url()->fromRoute('tableau-de-bord/ajouter', [], ['query' => ['namespace' => $namespace]], true)); if ($namespace) { $tableau->setNamespace($namespace); $form->get('namespace')->setAttribute('readonly', true); } $form->bind($tableau); $request = $this->getRequest(); Loading @@ -67,9 +71,14 @@ class TableauDeBordController extends AbstractActionController public function modifierAction() : ViewModel { $tableau = $this->getTableauDeBordService()->getRequestedTableauDeBord($this); $namespace = $this->params()->fromQuery('namespace'); $form = $this->getTableauDeBordForm(); $form->setAttribute('action', $this->url()->fromRoute('tableau-de-bord/modifier', ['tableau-de-bord' => $tableau->getId()], [], true)); $form->setAttribute('action', $this->url()->fromRoute('tableau-de-bord/modifier', ['tableau-de-bord' => $tableau->getId()], ['query' => ['namespace' => $namespace]], true)); if ($namespace) { $tableau->setNamespace($namespace); $form->get('namespace')->setAttribute('readonly', true); } $form->bind($tableau); $request = $this->getRequest(); Loading src/UnicaenIndicateur/Form/TableauDeBord/TableauDeBordHydrator.php +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ class TableauDeBordHydrator implements HydratorInterface { $data = [ 'libelle' => $object->getTitre(), 'description' => $object->getDescription(), 'namespance' => $object->getNamespace(), 'namespace' => $object->getNamespace(), 'nb_colonne' => $object->getNbColumn(), ]; return $data; Loading view/unicaen-indicateur/tableau-de-bord/afficher.phtml +2 −1 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ use UnicaenIndicateur\Service\Indicateur\IndicateurService; * @see \UnicaenIndicateur\Controller\TableauDeBordController::afficherAction() * @var TableauDeBord $tableau * @var IndicateurService $indicateurService * @var ?string $retour */ $this->headTitle($tableau?$tableau->getTitre():"Tableau de bord supprimé"); Loading Loading @@ -40,7 +41,7 @@ $width = 12 / ((int) ($tableau?$tableau->getNbColumn():1)); <div class="col-md-3"> <?php if ($canIndex) : ?> <?php /** @see \UnicaenIndicateur\Controller\TableauDeBordController::indexAction() */ ?> <a href="<?php echo $this->url('tableau-de-bord', [], [], true); ?>" <a href="<?php echo $retour??$this->url('tableau-de-bord', [], [], true); ?>" class="btn btn-secondary"> <span class="icon icon-lister"></span> Accéder aux tableaux de bord Loading Loading
src/UnicaenIndicateur/Controller/IndicateurController.php +4 −3 Original line number Diff line number Diff line Loading @@ -66,10 +66,10 @@ class IndicateurController extends AbstractActionController { public function creerAction() : ViewModel { $indicateur = new Indicateur(); $namespace = $this->params()->fromQuery('namespace'); $form = $this->getIndicateurForm(); $form->setAttribute('action', $this->url()->fromRoute('indicateur/creer', [], ['query' => ['namespace' => $namespace]], true)); $namespace = $this->params()->fromQuery('namespace'); if ($namespace) { $indicateur->setNamespace($namespace); $form->get('namespace')->setAttribute('readonly', true); Loading Loading @@ -100,9 +100,10 @@ class IndicateurController extends AbstractActionController { public function modifierAction(): ViewModel { $indicateur = $this->getIndicateurService()->getRequestedIndicateur($this); $form = $this->getIndicateurForm(); $form->setAttribute('action', $this->url()->fromRoute('indicateur/modifier', [], [], true)); $namespace = $this->params()->fromQuery('namespace'); $form = $this->getIndicateurForm(); $form->setAttribute('action', $this->url()->fromRoute('indicateur/modifier', ['indicateur' => $indicateur], ['query' => ['namespace' => $namespace]], true)); if ($namespace) { $indicateur->setNamespace($namespace); $form->get('namespace')->setAttribute('readonly', true); Loading
src/UnicaenIndicateur/Controller/TableauDeBordController.php +13 −4 Original line number Diff line number Diff line Loading @@ -28,22 +28,26 @@ class TableauDeBordController extends AbstractActionController public function afficherAction() : ViewModel { $tableau = $this->getTableauDeBordService()->getRequestedTableauDeBord($this); $retour = $this->params()->fromQuery('retour'); return new ViewModel([ 'tableau' => $tableau, 'indicateurService' => $this->getIndicateurService(), 'retour' => $retour, ]); } public function ajouterAction() : ViewModel { $tableau = new TableauDeBord(); $namespace = $this->params()->fromQuery('namespace'); if ($namespace) $tableau->setNamespace($namespace); $form = $this->getTableauDeBordForm(); $form->setAttribute('action', $this->url()->fromRoute('tableau-de-bord/ajouter', [], [], true)); $form->setAttribute('action', $this->url()->fromRoute('tableau-de-bord/ajouter', [], ['query' => ['namespace' => $namespace]], true)); if ($namespace) { $tableau->setNamespace($namespace); $form->get('namespace')->setAttribute('readonly', true); } $form->bind($tableau); $request = $this->getRequest(); Loading @@ -67,9 +71,14 @@ class TableauDeBordController extends AbstractActionController public function modifierAction() : ViewModel { $tableau = $this->getTableauDeBordService()->getRequestedTableauDeBord($this); $namespace = $this->params()->fromQuery('namespace'); $form = $this->getTableauDeBordForm(); $form->setAttribute('action', $this->url()->fromRoute('tableau-de-bord/modifier', ['tableau-de-bord' => $tableau->getId()], [], true)); $form->setAttribute('action', $this->url()->fromRoute('tableau-de-bord/modifier', ['tableau-de-bord' => $tableau->getId()], ['query' => ['namespace' => $namespace]], true)); if ($namespace) { $tableau->setNamespace($namespace); $form->get('namespace')->setAttribute('readonly', true); } $form->bind($tableau); $request = $this->getRequest(); Loading
src/UnicaenIndicateur/Form/TableauDeBord/TableauDeBordHydrator.php +1 −1 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ class TableauDeBordHydrator implements HydratorInterface { $data = [ 'libelle' => $object->getTitre(), 'description' => $object->getDescription(), 'namespance' => $object->getNamespace(), 'namespace' => $object->getNamespace(), 'nb_colonne' => $object->getNbColumn(), ]; return $data; Loading
view/unicaen-indicateur/tableau-de-bord/afficher.phtml +2 −1 Original line number Diff line number Diff line Loading @@ -9,6 +9,7 @@ use UnicaenIndicateur\Service\Indicateur\IndicateurService; * @see \UnicaenIndicateur\Controller\TableauDeBordController::afficherAction() * @var TableauDeBord $tableau * @var IndicateurService $indicateurService * @var ?string $retour */ $this->headTitle($tableau?$tableau->getTitre():"Tableau de bord supprimé"); Loading Loading @@ -40,7 +41,7 @@ $width = 12 / ((int) ($tableau?$tableau->getNbColumn():1)); <div class="col-md-3"> <?php if ($canIndex) : ?> <?php /** @see \UnicaenIndicateur\Controller\TableauDeBordController::indexAction() */ ?> <a href="<?php echo $this->url('tableau-de-bord', [], [], true); ?>" <a href="<?php echo $retour??$this->url('tableau-de-bord', [], [], true); ?>" class="btn btn-secondary"> <span class="icon icon-lister"></span> Accéder aux tableaux de bord Loading