Loading module/Application/config/merged/fiche-metier.config.php +1 −1 Changes for module/Application/config/merged/fiche-metier.config.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -140,7 +140,7 @@ return [ 'specificite' => [ 'type' => Segment::class, 'options' => [ 'route' => '/specificite/:id', 'route' => '/specificite/:fiche', 'defaults' => [ 'controller' => FicheMetierController::class, 'action' => 'editer-specificite-poste', Loading module/Application/src/Application/Controller/FicheMetier/FicheMetierController.php +11 −3 Changes for module/Application/src/Application/Controller/FicheMetier/FicheMetierController.php: 11 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -40,7 +40,6 @@ class FicheMetierController extends AbstractActionController return new ViewModel([ 'fiche' => $fiche, 'specificite' => $this->getFicheMetierService()->getSpecificitePoste(9), ]); } Loading Loading @@ -225,9 +224,17 @@ class FicheMetierController extends AbstractActionController public function editerSpecificitePosteAction() { $ficheId = $this->params()->fromRoute('fiche'); $fiche = $this->getFicheMetierService()->getFicheMetier($ficheId); $specificite = null; if ($fiche->getSpecificite()) { $specificite = $fiche->getSpecificite(); } else { $specificite = new SpecificitePoste(); $fiche = $this->getFicheMetierService()->getFicheMetier(1); $fiche->setSpecificite($specificite); $this->getFicheMetierService()->createSpecificitePoste($specificite); } /** @var SpecificitePosteForm $form */ $form = $form = $this->getServiceLocator()->get('FormElementManager')->get(SpecificitePosteForm::class); Loading @@ -240,7 +247,8 @@ class FicheMetierController extends AbstractActionController $form->setData($data); if ($form->isValid()) { $specificite->setFiche($fiche); $this->getFicheMetierService()->createSpecificitePoste($specificite); $this->getFicheMetierService()->updateSpecificitePoste($specificite); $this->getFicheMetierService()->update($fiche); } } Loading module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.FicheMetier.dcm.xml +4 −1 Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.FicheMetier.dcm.xml: 4 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -31,6 +31,9 @@ </many-to-one> <!--<one-to-one field="specificite" target-entity="Application\Entity\Db\SpecificitePoste" mapped-by="id"/>--> <one-to-one field="specificite" target-entity="Application\Entity\Db\SpecificitePoste"> <join-column name="specificite" referenced-column-name="id" /> </one-to-one> </entity> </doctrine-mapping> module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.SpecificitePoste.dcm.xml +3 −1 Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.SpecificitePoste.dcm.xml: 3 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -6,7 +6,9 @@ <generator strategy="IDENTITY"/> </id> <!--<one-to-one field="fiche" target-entity="Application\Entity\Db\FicheMetier" mapped-by="id"/>--> <one-to-one field="fiche" target-entity="Application\Entity\Db\FicheMetier"> <join-column name="fiche_metier" referenced-column-name="id" /> </one-to-one> <field name="specificite" type="string" length="2048" column="specificite" nullable="true"/> Loading module/Application/view/application/fiche-metier/afficher.phtml +5 −3 Changes for module/Application/view/application/fiche-metier/afficher.phtml: 5 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -268,13 +268,16 @@ $canEditer = $this->isAllowed(FicheMetierPrivileges::getResourceId(FicheMetierPr <div class="panel-body"> <?php if($canEditer) : ?> <a href="<?php echo $this->url('fiche-metier/specificite',['id' => $fiche->getId()], [], true); ?>" <a href="<?php echo $this->url('fiche-metier/specificite',['fiche' => $fiche->getId()], [], true); ?>" class="btn btn-primary action ajax-modal"> <span class="glyphicon glyphicon-pencil"></span> Éditer la spécificité du poste </a> <?php endif; ?> <?php if ($fiche->getSpecificite()) : ?> <?php $specificite = $fiche->getSpecificite(); ?> <?php if ($specificite->getSpecificite()) : ?> <h3> Spécificité du poste </h3> Loading Loading @@ -311,8 +314,7 @@ $canEditer = $this->isAllowed(FicheMetierPrivileges::getResourceId(FicheMetierPr <?php echo $specificite->getMoyens(); ?> <?php endif; ?> <?php endif; ?> </div> </div> Loading
module/Application/config/merged/fiche-metier.config.php +1 −1 Changes for module/Application/config/merged/fiche-metier.config.php: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -140,7 +140,7 @@ return [ 'specificite' => [ 'type' => Segment::class, 'options' => [ 'route' => '/specificite/:id', 'route' => '/specificite/:fiche', 'defaults' => [ 'controller' => FicheMetierController::class, 'action' => 'editer-specificite-poste', Loading
module/Application/src/Application/Controller/FicheMetier/FicheMetierController.php +11 −3 Changes for module/Application/src/Application/Controller/FicheMetier/FicheMetierController.php: 11 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -40,7 +40,6 @@ class FicheMetierController extends AbstractActionController return new ViewModel([ 'fiche' => $fiche, 'specificite' => $this->getFicheMetierService()->getSpecificitePoste(9), ]); } Loading Loading @@ -225,9 +224,17 @@ class FicheMetierController extends AbstractActionController public function editerSpecificitePosteAction() { $ficheId = $this->params()->fromRoute('fiche'); $fiche = $this->getFicheMetierService()->getFicheMetier($ficheId); $specificite = null; if ($fiche->getSpecificite()) { $specificite = $fiche->getSpecificite(); } else { $specificite = new SpecificitePoste(); $fiche = $this->getFicheMetierService()->getFicheMetier(1); $fiche->setSpecificite($specificite); $this->getFicheMetierService()->createSpecificitePoste($specificite); } /** @var SpecificitePosteForm $form */ $form = $form = $this->getServiceLocator()->get('FormElementManager')->get(SpecificitePosteForm::class); Loading @@ -240,7 +247,8 @@ class FicheMetierController extends AbstractActionController $form->setData($data); if ($form->isValid()) { $specificite->setFiche($fiche); $this->getFicheMetierService()->createSpecificitePoste($specificite); $this->getFicheMetierService()->updateSpecificitePoste($specificite); $this->getFicheMetierService()->update($fiche); } } Loading
module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.FicheMetier.dcm.xml +4 −1 Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.FicheMetier.dcm.xml: 4 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -31,6 +31,9 @@ </many-to-one> <!--<one-to-one field="specificite" target-entity="Application\Entity\Db\SpecificitePoste" mapped-by="id"/>--> <one-to-one field="specificite" target-entity="Application\Entity\Db\SpecificitePoste"> <join-column name="specificite" referenced-column-name="id" /> </one-to-one> </entity> </doctrine-mapping>
module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.SpecificitePoste.dcm.xml +3 −1 Changes for module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.SpecificitePoste.dcm.xml: 3 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -6,7 +6,9 @@ <generator strategy="IDENTITY"/> </id> <!--<one-to-one field="fiche" target-entity="Application\Entity\Db\FicheMetier" mapped-by="id"/>--> <one-to-one field="fiche" target-entity="Application\Entity\Db\FicheMetier"> <join-column name="fiche_metier" referenced-column-name="id" /> </one-to-one> <field name="specificite" type="string" length="2048" column="specificite" nullable="true"/> Loading
module/Application/view/application/fiche-metier/afficher.phtml +5 −3 Changes for module/Application/view/application/fiche-metier/afficher.phtml: 5 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -268,13 +268,16 @@ $canEditer = $this->isAllowed(FicheMetierPrivileges::getResourceId(FicheMetierPr <div class="panel-body"> <?php if($canEditer) : ?> <a href="<?php echo $this->url('fiche-metier/specificite',['id' => $fiche->getId()], [], true); ?>" <a href="<?php echo $this->url('fiche-metier/specificite',['fiche' => $fiche->getId()], [], true); ?>" class="btn btn-primary action ajax-modal"> <span class="glyphicon glyphicon-pencil"></span> Éditer la spécificité du poste </a> <?php endif; ?> <?php if ($fiche->getSpecificite()) : ?> <?php $specificite = $fiche->getSpecificite(); ?> <?php if ($specificite->getSpecificite()) : ?> <h3> Spécificité du poste </h3> Loading Loading @@ -311,8 +314,7 @@ $canEditer = $this->isAllowed(FicheMetierPrivileges::getResourceId(FicheMetierPr <?php echo $specificite->getMoyens(); ?> <?php endif; ?> <?php endif; ?> </div> </div>