Loading module/Application/config/merged/structure.config.php +14 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,8 @@ return [ [ 'controller' => StructureController::class, 'action' => [ 'editer-description' 'editer-description', 'toggle-resume-mere', ], 'privileges' => StructurePrivileges::STRUCTURE_DESCRIPTION, 'assertion' => StructureAssertion::class, Loading Loading @@ -183,6 +184,18 @@ return [ 'may_terminate' => true, 'child_routes' => [], ], 'toggle-resume-mere' => [ 'type' => Segment::class, 'options' => [ 'route' => '/toggle-resume-mere/:structure', 'defaults' => [ 'controller' => StructureController::class, 'action' => 'toggle-resume-mere', ], ], 'may_terminate' => true, 'child_routes' => [], ], /** Fonctions de recherche de structures **********************************************************/ 'rechercher' => [ 'type' => Literal::class, Loading module/Application/src/Application/Controller/StructureController.php +9 −0 Original line number Diff line number Diff line Loading @@ -189,6 +189,15 @@ class StructureController extends AbstractActionController { return $this->redirect()->toRoute('structure/afficher', ['structure' => $structure->getId()], [], true); } public function toggleResumeMereAction() { $structure = $this->getStructureService()->getRequestedStructure($this, 'structure'); $structure->setRepriseResumeMere(! $structure->getRepriseResumeMere()); $this->getStructureService()->update($structure); return $this->redirect()->toRoute('structure/afficher', ['structure' => $structure->getId()], [], true); } /** Fonctions de recherche ****************************************************************************************/ public function rechercherAction() { Loading module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Structure.dcm.xml +1 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ <field name="description" column="description" type="string" length="10240"/> <field name="ouverture" column="ouverture" type="datetime" /> <field name="fermeture" column="fermeture" type="datetime" /> <field name="repriseResumeMere" column="resume_mere" type="boolean" /> <many-to-one target-entity="Application\Entity\Db\StructureType" field="type"> <join-column name="type" referenced-column-name="source_id" /> Loading module/Application/src/Application/Entity/Db/Structure.php +23 −1 Original line number Diff line number Diff line Loading @@ -34,6 +34,8 @@ class Structure implements ResourceInterface, SynchroAwareInterface { private $ouverture; /** @var DateTime */ private $fermeture; /** @var Boolean */ private $repriseResumeMere; /** @var Structure */ private $parent; /** @var ArrayCollection (Structure) */ Loading Loading @@ -116,7 +118,11 @@ class Structure implements ResourceInterface, SynchroAwareInterface { */ public function getDescription() { return $this->description; $text = ""; if ($this->getRepriseResumeMere() AND $this->parent !== null) { $text .= $this->parent->getDescription() . "<br/>"; } return $text . $this->description ; } /** Loading Loading @@ -267,7 +273,23 @@ class Structure implements ResourceInterface, SynchroAwareInterface { return $this; } /** * @return bool */ public function getRepriseResumeMere() { return $this->repriseResumeMere; } /** * @param bool $repriseResumeMere * @return Structure */ public function setRepriseResumeMere($repriseResumeMere) { $this->repriseResumeMere = $repriseResumeMere; return $this; } /** * @return string Loading module/Application/view/application/structure/partial/resume.phtml +20 −0 Original line number Diff line number Diff line Loading @@ -27,8 +27,28 @@ $canEditerGestionnaire = $this->isAllowed($structure, StructurePrivileges::STRU <span class="icon editer" data-toggle="tooltip" data-html="true" title="Modifier la description de la structure <span class='highlight structure'><?php echo $structure->getLibelleLong(); ?></span>"> </span></a> <a <?php /** @see \Application\Controller\StructureController::editerDescriptionAction() */ ?> href="<?php echo $this->url('structure/toggle-resume-mere', ['structure' => $structure->getId()], [], true); ?>" > <?php if ($structure->getRepriseResumeMere()) : ?> <span class="icon ko" data-toggle="tooltip" data-html="true" title="Ne plus réutiliser le résumé de la structure mère"> </span></a> <?php else : ?> <span class="icon ok" data-toggle="tooltip" data-html="true" title="Réutiliser le résumé de la structure mère"> </span></a> <?php endif; ?> <?php endif; ?> </h2> <?php if ($structure->getRepriseResumeMere()) : ?> <div class="alert alert-info"> <span class="icon information"></span> Reprise du résumé de la structure mère. </div> <?php endif; ?> <?php if ($structure->getDescription()) : ?> <?php echo $structure->getDescription(); ?> <?php else : ?> Loading Loading
module/Application/config/merged/structure.config.php +14 −1 Original line number Diff line number Diff line Loading @@ -71,7 +71,8 @@ return [ [ 'controller' => StructureController::class, 'action' => [ 'editer-description' 'editer-description', 'toggle-resume-mere', ], 'privileges' => StructurePrivileges::STRUCTURE_DESCRIPTION, 'assertion' => StructureAssertion::class, Loading Loading @@ -183,6 +184,18 @@ return [ 'may_terminate' => true, 'child_routes' => [], ], 'toggle-resume-mere' => [ 'type' => Segment::class, 'options' => [ 'route' => '/toggle-resume-mere/:structure', 'defaults' => [ 'controller' => StructureController::class, 'action' => 'toggle-resume-mere', ], ], 'may_terminate' => true, 'child_routes' => [], ], /** Fonctions de recherche de structures **********************************************************/ 'rechercher' => [ 'type' => Literal::class, Loading
module/Application/src/Application/Controller/StructureController.php +9 −0 Original line number Diff line number Diff line Loading @@ -189,6 +189,15 @@ class StructureController extends AbstractActionController { return $this->redirect()->toRoute('structure/afficher', ['structure' => $structure->getId()], [], true); } public function toggleResumeMereAction() { $structure = $this->getStructureService()->getRequestedStructure($this, 'structure'); $structure->setRepriseResumeMere(! $structure->getRepriseResumeMere()); $this->getStructureService()->update($structure); return $this->redirect()->toRoute('structure/afficher', ['structure' => $structure->getId()], [], true); } /** Fonctions de recherche ****************************************************************************************/ public function rechercherAction() { Loading
module/Application/src/Application/Entity/Db/Mapping/Application.Entity.Db.Structure.dcm.xml +1 −0 Original line number Diff line number Diff line Loading @@ -12,6 +12,7 @@ <field name="description" column="description" type="string" length="10240"/> <field name="ouverture" column="ouverture" type="datetime" /> <field name="fermeture" column="fermeture" type="datetime" /> <field name="repriseResumeMere" column="resume_mere" type="boolean" /> <many-to-one target-entity="Application\Entity\Db\StructureType" field="type"> <join-column name="type" referenced-column-name="source_id" /> Loading
module/Application/src/Application/Entity/Db/Structure.php +23 −1 Original line number Diff line number Diff line Loading @@ -34,6 +34,8 @@ class Structure implements ResourceInterface, SynchroAwareInterface { private $ouverture; /** @var DateTime */ private $fermeture; /** @var Boolean */ private $repriseResumeMere; /** @var Structure */ private $parent; /** @var ArrayCollection (Structure) */ Loading Loading @@ -116,7 +118,11 @@ class Structure implements ResourceInterface, SynchroAwareInterface { */ public function getDescription() { return $this->description; $text = ""; if ($this->getRepriseResumeMere() AND $this->parent !== null) { $text .= $this->parent->getDescription() . "<br/>"; } return $text . $this->description ; } /** Loading Loading @@ -267,7 +273,23 @@ class Structure implements ResourceInterface, SynchroAwareInterface { return $this; } /** * @return bool */ public function getRepriseResumeMere() { return $this->repriseResumeMere; } /** * @param bool $repriseResumeMere * @return Structure */ public function setRepriseResumeMere($repriseResumeMere) { $this->repriseResumeMere = $repriseResumeMere; return $this; } /** * @return string Loading
module/Application/view/application/structure/partial/resume.phtml +20 −0 Original line number Diff line number Diff line Loading @@ -27,8 +27,28 @@ $canEditerGestionnaire = $this->isAllowed($structure, StructurePrivileges::STRU <span class="icon editer" data-toggle="tooltip" data-html="true" title="Modifier la description de la structure <span class='highlight structure'><?php echo $structure->getLibelleLong(); ?></span>"> </span></a> <a <?php /** @see \Application\Controller\StructureController::editerDescriptionAction() */ ?> href="<?php echo $this->url('structure/toggle-resume-mere', ['structure' => $structure->getId()], [], true); ?>" > <?php if ($structure->getRepriseResumeMere()) : ?> <span class="icon ko" data-toggle="tooltip" data-html="true" title="Ne plus réutiliser le résumé de la structure mère"> </span></a> <?php else : ?> <span class="icon ok" data-toggle="tooltip" data-html="true" title="Réutiliser le résumé de la structure mère"> </span></a> <?php endif; ?> <?php endif; ?> </h2> <?php if ($structure->getRepriseResumeMere()) : ?> <div class="alert alert-info"> <span class="icon information"></span> Reprise du résumé de la structure mère. </div> <?php endif; ?> <?php if ($structure->getDescription()) : ?> <?php echo $structure->getDescription(); ?> <?php else : ?> Loading