Loading data/privileges.php +18 −15 Original line number Diff line number Diff line Loading @@ -19,6 +19,9 @@ return [ 'grands-types-diplome-edition' => 'Grands types de diplômes (édition)', 'types-diplome-visualisation' => 'Types de diplômes (visualisation)', 'types-diplome-edition' => 'Types de diplômes (édition)', 'element-cc-edition' => 'Enseignements - Centre de coût - Édition', 'element-modulateur-edition' => 'Enseignements - Modulateur - Édition', 'element-modulateur-cc-visualisation' => 'Enseignement - Centre de coût et Modulateur - Visualisation', ], ], Loading module/Application/config/offre-formation.config.php +34 −7 Original line number Diff line number Diff line Loading @@ -102,6 +102,18 @@ return [ ], ], ], 'modulateurs-centres-couts' => [ 'type' => 'Segment', 'options' => [ 'route' => '/modulateurs-centres-couts/:elementPedagogique', 'constraints' => [ 'elementPedagogique' => '[0-9]*', ], 'defaults' => [ 'action' => 'modulateurs-centres-couts', ], ], ], ], ], 'etape' => [ Loading Loading @@ -250,6 +262,16 @@ return [ Privileges::ODF_ELEMENT_VH_EDITION, ], ], [ 'controller' => 'Application\Controller\OffreFormation\ElementPedagogique', 'action' => ['modulateurs-centres-couts'], 'privileges' => [ Privileges::ODF_ELEMENT_CC_EDITION, Privileges::ODF_ELEMENT_MODULATEUR_EDITION, Privileges::ODF_ELEMENT_MODULATEUR_CC_VISUALISATION, ], ], [ 'controller' => 'Application\Controller\OffreFormation\ElementPedagogique', Loading Loading @@ -318,6 +340,11 @@ return [ 'resources' => ['Etape', 'Structure', 'ElementPedagogique', 'VolumeHoraireEns', 'TypeIntervention'], 'assertion' => Assertion\OffreDeFormationAssertion::class, ], [ 'privileges' => Privileges::ODF_ELEMENT_MODULATEUR_CC_VISUALISATION, 'resources' => ['Etape', 'Structure', 'ElementPedagogique', 'CentreCoutEp', 'ElementModulateur'], 'assertion' => Assertion\OffreDeFormationAssertion::class, ], ], ], ], Loading module/Application/src/Application/Controller/OffreFormation/ElementPedagogiqueController.php +16 −4 Original line number Diff line number Diff line Loading @@ -255,4 +255,16 @@ class ElementPedagogiqueController extends AbstractController return compact('title', 'vhes', 'form'); } public function modulateursCentresCoutsAction() { $this->em()->getFilters()->enable('historique')->init([ \Application\Entity\Db\Modulateur::class, \Application\Entity\Db\CentreCoutEp::class, ]); return []; } } module/Application/src/Application/Provider/Privilege/Privileges.php +5 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,8 @@ namespace Application\Provider\Privilege; * * @author UnicaenCode */ class Privileges extends \UnicaenAuth\Provider\Privilege\Privileges { class Privileges extends \UnicaenAuth\Provider\Privilege\Privileges { const AGREMENT_CONSEIL_ACADEMIQUE_EDITION = 'agrement-conseil-academique-edition'; const AGREMENT_CONSEIL_ACADEMIQUE_SUPPRESSION = 'agrement-conseil-academique-suppression'; Loading Loading @@ -133,6 +134,9 @@ class Privileges extends \UnicaenAuth\Provider\Privilege\Privileges { const ODF_ELEMENT_EDITION = 'odf-element-edition'; const ODF_ELEMENT_VH_EDITION = 'odf-element-vh-edition'; const ODF_ELEMENT_VH_VISUALISATION = 'odf-element-vh-visualisation'; const ODF_ELEMENT_CC_EDITION = 'odf-element-cc-edition'; const ODF_ELEMENT_MODULATEUR_EDITION = 'odf-element-modulateur-edition'; const ODF_ELEMENT_MODULATEUR_CC_VISUALISATION = 'odf-element-modulateur-cc-visualisation'; const ODF_ELEMENT_VISUALISATION = 'odf-element-visualisation'; const ODF_ETAPE_EDITION = 'odf-etape-edition'; const ODF_ETAPE_VISUALISATION = 'odf-etape-visualisation'; Loading module/Application/view/application/offre-formation/element-pedagogique/voir.phtml +9 −0 Original line number Diff line number Diff line Loading @@ -18,4 +18,13 @@ if ($this->isAllowed(Privileges::getResourceId(Privileges::ODF_ELEMENT_VH_VISUAL ]; } if($this->isAllowed(Privileges::getResourceId(Privileges::ODF_ELEMENT_MODULATEUR_CC_VISUALISATION))){ $tabs[] = [ 'id' => 'modulateur-cc', 'label' => '<span class="glyphicon glyphicon-time"></span> Modulateurs et Centres de coûts', 'url' => $this->url('of/element/modulateurs-centres-couts', ['elementPedagogique' => $element->getId()]), ]; } echo $this->tabajax($tabs); Loading
data/privileges.php +18 −15 Original line number Diff line number Diff line Loading @@ -19,6 +19,9 @@ return [ 'grands-types-diplome-edition' => 'Grands types de diplômes (édition)', 'types-diplome-visualisation' => 'Types de diplômes (visualisation)', 'types-diplome-edition' => 'Types de diplômes (édition)', 'element-cc-edition' => 'Enseignements - Centre de coût - Édition', 'element-modulateur-edition' => 'Enseignements - Modulateur - Édition', 'element-modulateur-cc-visualisation' => 'Enseignement - Centre de coût et Modulateur - Visualisation', ], ], Loading
module/Application/config/offre-formation.config.php +34 −7 Original line number Diff line number Diff line Loading @@ -102,6 +102,18 @@ return [ ], ], ], 'modulateurs-centres-couts' => [ 'type' => 'Segment', 'options' => [ 'route' => '/modulateurs-centres-couts/:elementPedagogique', 'constraints' => [ 'elementPedagogique' => '[0-9]*', ], 'defaults' => [ 'action' => 'modulateurs-centres-couts', ], ], ], ], ], 'etape' => [ Loading Loading @@ -250,6 +262,16 @@ return [ Privileges::ODF_ELEMENT_VH_EDITION, ], ], [ 'controller' => 'Application\Controller\OffreFormation\ElementPedagogique', 'action' => ['modulateurs-centres-couts'], 'privileges' => [ Privileges::ODF_ELEMENT_CC_EDITION, Privileges::ODF_ELEMENT_MODULATEUR_EDITION, Privileges::ODF_ELEMENT_MODULATEUR_CC_VISUALISATION, ], ], [ 'controller' => 'Application\Controller\OffreFormation\ElementPedagogique', Loading Loading @@ -318,6 +340,11 @@ return [ 'resources' => ['Etape', 'Structure', 'ElementPedagogique', 'VolumeHoraireEns', 'TypeIntervention'], 'assertion' => Assertion\OffreDeFormationAssertion::class, ], [ 'privileges' => Privileges::ODF_ELEMENT_MODULATEUR_CC_VISUALISATION, 'resources' => ['Etape', 'Structure', 'ElementPedagogique', 'CentreCoutEp', 'ElementModulateur'], 'assertion' => Assertion\OffreDeFormationAssertion::class, ], ], ], ], Loading
module/Application/src/Application/Controller/OffreFormation/ElementPedagogiqueController.php +16 −4 Original line number Diff line number Diff line Loading @@ -255,4 +255,16 @@ class ElementPedagogiqueController extends AbstractController return compact('title', 'vhes', 'form'); } public function modulateursCentresCoutsAction() { $this->em()->getFilters()->enable('historique')->init([ \Application\Entity\Db\Modulateur::class, \Application\Entity\Db\CentreCoutEp::class, ]); return []; } }
module/Application/src/Application/Provider/Privilege/Privileges.php +5 −1 Original line number Diff line number Diff line Loading @@ -9,7 +9,8 @@ namespace Application\Provider\Privilege; * * @author UnicaenCode */ class Privileges extends \UnicaenAuth\Provider\Privilege\Privileges { class Privileges extends \UnicaenAuth\Provider\Privilege\Privileges { const AGREMENT_CONSEIL_ACADEMIQUE_EDITION = 'agrement-conseil-academique-edition'; const AGREMENT_CONSEIL_ACADEMIQUE_SUPPRESSION = 'agrement-conseil-academique-suppression'; Loading Loading @@ -133,6 +134,9 @@ class Privileges extends \UnicaenAuth\Provider\Privilege\Privileges { const ODF_ELEMENT_EDITION = 'odf-element-edition'; const ODF_ELEMENT_VH_EDITION = 'odf-element-vh-edition'; const ODF_ELEMENT_VH_VISUALISATION = 'odf-element-vh-visualisation'; const ODF_ELEMENT_CC_EDITION = 'odf-element-cc-edition'; const ODF_ELEMENT_MODULATEUR_EDITION = 'odf-element-modulateur-edition'; const ODF_ELEMENT_MODULATEUR_CC_VISUALISATION = 'odf-element-modulateur-cc-visualisation'; const ODF_ELEMENT_VISUALISATION = 'odf-element-visualisation'; const ODF_ETAPE_EDITION = 'odf-etape-edition'; const ODF_ETAPE_VISUALISATION = 'odf-etape-visualisation'; Loading
module/Application/view/application/offre-formation/element-pedagogique/voir.phtml +9 −0 Original line number Diff line number Diff line Loading @@ -18,4 +18,13 @@ if ($this->isAllowed(Privileges::getResourceId(Privileges::ODF_ELEMENT_VH_VISUAL ]; } if($this->isAllowed(Privileges::getResourceId(Privileges::ODF_ELEMENT_MODULATEUR_CC_VISUALISATION))){ $tabs[] = [ 'id' => 'modulateur-cc', 'label' => '<span class="glyphicon glyphicon-time"></span> Modulateurs et Centres de coûts', 'url' => $this->url('of/element/modulateurs-centres-couts', ['elementPedagogique' => $element->getId()]), ]; } echo $this->tabajax($tabs);