Loading module/Application/config/merged/menu.config.php +8 −4 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ return [ ], 'ressource' => [ 'order' => 100, 'label' => 'Ressources RH', 'label' => 'Ressources', 'route' => 'ressource-rh', 'resource' => RessourceRhPrivileges::getResourceId(RessourceRhPrivileges::AFFICHER) , 'pages' => [ Loading Loading @@ -110,7 +110,7 @@ return [ ], [ 'order' => 5, 'label' => 'Les métiers et familles de métiers', 'label' => 'Les métiers et familles professionnelles', 'route' => 'ressource-rh/index-metier-et-famille', 'resource' => RessourceRhPrivileges::getResourceId(RessourceRhPrivileges::AFFICHER) , 'dropdown-header' => true, Loading @@ -130,7 +130,7 @@ return [ ], 'entretien' => [ 'order' => 100, 'label' => 'Entretiens Pro.', 'label' => 'Entretiens', 'route' => 'entretien-professionnel', 'resource' => AdministrationPrivileges::getResourceId(AdministrationPrivileges::AFFICHER), 'pages' => [ Loading @@ -141,14 +141,15 @@ return [ 'label' => 'Administration', 'title' => "Administration", 'route' => 'administration', 'resource' => AdministrationPrivileges::getResourceId(AdministrationPrivileges::AFFICHER) , 'pages' => [ [ 'label' => 'Mailing', 'route' => 'mailing', 'roles' => [], //'privileges' => MailingPrivileges::AFFICHER, 'dropdown-header' => true, 'icon' => 'fas fa-angle-right' ], [ 'label' => 'Utilisateurs', Loading @@ -163,6 +164,7 @@ return [ 'route' => 'privilege', 'resource' => \UnicaenAuth\Guard\PrivilegeController::getResourceId('UnicaenAuth\Controller\Droits', 'privileges'), 'withtarget' => true, 'dropdown-header' => true, 'icon' => 'fas fa-angle-right' ], 'autoform' => [ Loading @@ -171,6 +173,7 @@ return [ 'route' => 'autoform/formulaires', 'roles' => [], // 'withtarget' => true, 'dropdown-header' => true, 'icon' => 'fas fa-angle-right' ], 'fichier' => [ Loading @@ -179,6 +182,7 @@ return [ 'route' => 'index-fichier', 'roles' => [], // 'withtarget' => true, 'dropdown-header' => true, 'icon' => 'fas fa-angle-right' ], ], Loading module/Application/src/Application/Service/RessourceRh/RessourceRhService.php +1 −1 Original line number Diff line number Diff line Loading @@ -346,7 +346,7 @@ class RessourceRhService { public function getMetiersFamilles($order = null) { $qb = $this->getEntityManager()->getRepository(MetierFamille::class)->createQueryBuilder('famille') ->addSelect('metier')->join('famille.metiers', 'metier') ->addSelect('metier')->leftJoin('famille.metiers', 'metier') ; if ($order !== null) { Loading module/Application/view/application/ressource-rh/index-metier-et-famille.phtml +4 −4 Original line number Diff line number Diff line Loading @@ -16,11 +16,11 @@ $canEffacerRessource = $this->isAllowed(RessourceRhPrivileges::getResourceId( ?> <h1 class="page-header"> Index des métiers et familles de métiers Index des métiers et familles professionnelles </h1> <a href="<?php echo $this->url('ressource-rh', [], ['fragment' => 'metier']); ?>" class="btn btn-primary action">Métier</a> <a href="<?php echo $this->url('ressource-rh', [], ['fragment' => 'famille']); ?>" class="btn btn-primary action">Famille de métier</a> <a href="<?php echo $this->url('ressource-rh', [], ['fragment' => 'famille']); ?>" class="btn btn-primary action">Famille professionnelle</a> <div class="main"> Loading Loading @@ -84,7 +84,7 @@ $canEffacerRessource = $this->isAllowed(RessourceRhPrivileges::getResourceId( <a name="famille"></a> <div class="col-md-8"> <h2> Liste des familles de métier Liste des familles professionnelles <span class="badge"> <?php echo count($familles); ?> </span> Loading @@ -97,7 +97,7 @@ $canEffacerRessource = $this->isAllowed(RessourceRhPrivileges::getResourceId( data-event="modification" > <span class="icon ajouter"></span> Ajouter une famille de métier Ajouter une famille professionnelle </a> <?php endif;?> </div> Loading module/Application/view/layout/layout.phtml +11 −1 Original line number Diff line number Diff line Loading @@ -69,12 +69,22 @@ </div> <?php echo $this->appLink($this->appInfos()->nom) ?> </div> <div class="navbar-collapse bs-navbar-collapse collapse"> <?php //echo $this->navigation('navigation') // ->menu() // ->setUlClass('nav navbar-nav') // ->setPartial('layout/navigation.phtml'); ?> <?php echo $this->navigation()->menuPrincipal('navigation'); ?> <p class="navbar-text navbar-right"> <?php echo $this->appConnection(); ?> </p> </div><!--/.nav-collapse --> </div> </div> </div> Loading module/Application/view/layout/navigation.phtml 0 → 100644 +88 −0 Original line number Diff line number Diff line <?php /* @var $container Zend\Navigation\Navigation */ // On récupère le container en-dessous du 'home' $container = $this->container->getChildren(); ?> <ul class="<?php echo $this->navigation($container)->menu()->getUlClass(); ?>"> <?php foreach ($container as $page): ?> <?php if (!$this->navigation()->accept($page)) continue; ?> <?php /* @var $page Zend\Navigation\Page\Mvc */ ?> <?php $hasChildren = $page->hasPages() ?> <?php if (!$hasChildren): ?> <li<?php if ($page->isActive()) echo ' class="active"' ?>> <a class="nav-header" href="<?php echo $page->getHref() ?>" <?php if ($page->getTarget() != ""): ?> target="<?php echo $page->getTarget(); ?>" <?php endif; ?> > <?php if ($page->get("icon") !== ""): ?> <span class="<?php echo $page->get("icon"); ?>"></span> <?php endif; ?> <?php echo $this->escapeHtml($this->translate($page->getLabel(), $this->navigation($container)->getTranslatorTextDomain())); ?> </a> </li> <?php else: ?> <?php //check if access is allowed at least one item $access = false; foreach ($page->getPages() as $child) { if ($this->navigation()->accept($child) && $child->get("separator") !== true) { $access = true; } } if ($access) : ?> <li class="dropdown<?php if ($page->isActive(true)) echo ' active' ?>"> <a class="dropdown-toggle" data-toggle="dropdown" href="#"> <?php if ($page->get("icon") != ""): ?> <span class="icon"> <i class="<?php echo $page->get("icon"); ?>"></i> </span> <?php endif; ?> <?php echo $this->escapeHtml($this->translate($page->getLabel(), $this->navigation($container)->getTranslatorTextDomain())); ?> <b class="caret"></b> </a> <ul class="dropdown-menu"> <?php foreach ($page->getPages() as $child): ?> <?php if (!$this->navigation()->accept($child)) continue; ?> <?php if ($child->get("dropdown-header") === true): ?> <li role="presentation" class="dropdown-header"> <?php if ($child->get("icon") != ""): ?> <span class="icon"> <i class="<?php echo $child->get("icon"); ?>"></i> </span> <?php endif; ?> <?php echo $this->escapeHtml($this->translate($child->getLabel(), $this->navigation($container)->getTranslatorTextDomain())); ?> </li> <?php continue; endif; ?> <?php if ($child->get("separator") === true): ?> <li class="divider"></li> <?php continue; endif; ?> <li<?php if ($child->isActive()) echo ' class="active"' ?>> <a href="<?php echo $child->getHref() ?>" <?php if ($child->getTarget() != ""): ?> target="<?php echo $child->getTarget(); ?>" <?php endif; ?>> <?php if ($child->get("icon") != ""): ?> <span class="icon"> <i class="<?php echo $child->get("icon"); ?>"></i> </span> <?php endif; ?> <?php echo $this->escapeHtml($this->translate($child->getLabel(), $this->navigation($container)->getTranslatorTextDomain())); ?> </a> </li> <?php endforeach ?> </ul> </li> <?php endif; ?> <?php endif ?> <?php endforeach ?> </ul> Loading
module/Application/config/merged/menu.config.php +8 −4 Original line number Diff line number Diff line Loading @@ -72,7 +72,7 @@ return [ ], 'ressource' => [ 'order' => 100, 'label' => 'Ressources RH', 'label' => 'Ressources', 'route' => 'ressource-rh', 'resource' => RessourceRhPrivileges::getResourceId(RessourceRhPrivileges::AFFICHER) , 'pages' => [ Loading Loading @@ -110,7 +110,7 @@ return [ ], [ 'order' => 5, 'label' => 'Les métiers et familles de métiers', 'label' => 'Les métiers et familles professionnelles', 'route' => 'ressource-rh/index-metier-et-famille', 'resource' => RessourceRhPrivileges::getResourceId(RessourceRhPrivileges::AFFICHER) , 'dropdown-header' => true, Loading @@ -130,7 +130,7 @@ return [ ], 'entretien' => [ 'order' => 100, 'label' => 'Entretiens Pro.', 'label' => 'Entretiens', 'route' => 'entretien-professionnel', 'resource' => AdministrationPrivileges::getResourceId(AdministrationPrivileges::AFFICHER), 'pages' => [ Loading @@ -141,14 +141,15 @@ return [ 'label' => 'Administration', 'title' => "Administration", 'route' => 'administration', 'resource' => AdministrationPrivileges::getResourceId(AdministrationPrivileges::AFFICHER) , 'pages' => [ [ 'label' => 'Mailing', 'route' => 'mailing', 'roles' => [], //'privileges' => MailingPrivileges::AFFICHER, 'dropdown-header' => true, 'icon' => 'fas fa-angle-right' ], [ 'label' => 'Utilisateurs', Loading @@ -163,6 +164,7 @@ return [ 'route' => 'privilege', 'resource' => \UnicaenAuth\Guard\PrivilegeController::getResourceId('UnicaenAuth\Controller\Droits', 'privileges'), 'withtarget' => true, 'dropdown-header' => true, 'icon' => 'fas fa-angle-right' ], 'autoform' => [ Loading @@ -171,6 +173,7 @@ return [ 'route' => 'autoform/formulaires', 'roles' => [], // 'withtarget' => true, 'dropdown-header' => true, 'icon' => 'fas fa-angle-right' ], 'fichier' => [ Loading @@ -179,6 +182,7 @@ return [ 'route' => 'index-fichier', 'roles' => [], // 'withtarget' => true, 'dropdown-header' => true, 'icon' => 'fas fa-angle-right' ], ], Loading
module/Application/src/Application/Service/RessourceRh/RessourceRhService.php +1 −1 Original line number Diff line number Diff line Loading @@ -346,7 +346,7 @@ class RessourceRhService { public function getMetiersFamilles($order = null) { $qb = $this->getEntityManager()->getRepository(MetierFamille::class)->createQueryBuilder('famille') ->addSelect('metier')->join('famille.metiers', 'metier') ->addSelect('metier')->leftJoin('famille.metiers', 'metier') ; if ($order !== null) { Loading
module/Application/view/application/ressource-rh/index-metier-et-famille.phtml +4 −4 Original line number Diff line number Diff line Loading @@ -16,11 +16,11 @@ $canEffacerRessource = $this->isAllowed(RessourceRhPrivileges::getResourceId( ?> <h1 class="page-header"> Index des métiers et familles de métiers Index des métiers et familles professionnelles </h1> <a href="<?php echo $this->url('ressource-rh', [], ['fragment' => 'metier']); ?>" class="btn btn-primary action">Métier</a> <a href="<?php echo $this->url('ressource-rh', [], ['fragment' => 'famille']); ?>" class="btn btn-primary action">Famille de métier</a> <a href="<?php echo $this->url('ressource-rh', [], ['fragment' => 'famille']); ?>" class="btn btn-primary action">Famille professionnelle</a> <div class="main"> Loading Loading @@ -84,7 +84,7 @@ $canEffacerRessource = $this->isAllowed(RessourceRhPrivileges::getResourceId( <a name="famille"></a> <div class="col-md-8"> <h2> Liste des familles de métier Liste des familles professionnelles <span class="badge"> <?php echo count($familles); ?> </span> Loading @@ -97,7 +97,7 @@ $canEffacerRessource = $this->isAllowed(RessourceRhPrivileges::getResourceId( data-event="modification" > <span class="icon ajouter"></span> Ajouter une famille de métier Ajouter une famille professionnelle </a> <?php endif;?> </div> Loading
module/Application/view/layout/layout.phtml +11 −1 Original line number Diff line number Diff line Loading @@ -69,12 +69,22 @@ </div> <?php echo $this->appLink($this->appInfos()->nom) ?> </div> <div class="navbar-collapse bs-navbar-collapse collapse"> <?php //echo $this->navigation('navigation') // ->menu() // ->setUlClass('nav navbar-nav') // ->setPartial('layout/navigation.phtml'); ?> <?php echo $this->navigation()->menuPrincipal('navigation'); ?> <p class="navbar-text navbar-right"> <?php echo $this->appConnection(); ?> </p> </div><!--/.nav-collapse --> </div> </div> </div> Loading
module/Application/view/layout/navigation.phtml 0 → 100644 +88 −0 Original line number Diff line number Diff line <?php /* @var $container Zend\Navigation\Navigation */ // On récupère le container en-dessous du 'home' $container = $this->container->getChildren(); ?> <ul class="<?php echo $this->navigation($container)->menu()->getUlClass(); ?>"> <?php foreach ($container as $page): ?> <?php if (!$this->navigation()->accept($page)) continue; ?> <?php /* @var $page Zend\Navigation\Page\Mvc */ ?> <?php $hasChildren = $page->hasPages() ?> <?php if (!$hasChildren): ?> <li<?php if ($page->isActive()) echo ' class="active"' ?>> <a class="nav-header" href="<?php echo $page->getHref() ?>" <?php if ($page->getTarget() != ""): ?> target="<?php echo $page->getTarget(); ?>" <?php endif; ?> > <?php if ($page->get("icon") !== ""): ?> <span class="<?php echo $page->get("icon"); ?>"></span> <?php endif; ?> <?php echo $this->escapeHtml($this->translate($page->getLabel(), $this->navigation($container)->getTranslatorTextDomain())); ?> </a> </li> <?php else: ?> <?php //check if access is allowed at least one item $access = false; foreach ($page->getPages() as $child) { if ($this->navigation()->accept($child) && $child->get("separator") !== true) { $access = true; } } if ($access) : ?> <li class="dropdown<?php if ($page->isActive(true)) echo ' active' ?>"> <a class="dropdown-toggle" data-toggle="dropdown" href="#"> <?php if ($page->get("icon") != ""): ?> <span class="icon"> <i class="<?php echo $page->get("icon"); ?>"></i> </span> <?php endif; ?> <?php echo $this->escapeHtml($this->translate($page->getLabel(), $this->navigation($container)->getTranslatorTextDomain())); ?> <b class="caret"></b> </a> <ul class="dropdown-menu"> <?php foreach ($page->getPages() as $child): ?> <?php if (!$this->navigation()->accept($child)) continue; ?> <?php if ($child->get("dropdown-header") === true): ?> <li role="presentation" class="dropdown-header"> <?php if ($child->get("icon") != ""): ?> <span class="icon"> <i class="<?php echo $child->get("icon"); ?>"></i> </span> <?php endif; ?> <?php echo $this->escapeHtml($this->translate($child->getLabel(), $this->navigation($container)->getTranslatorTextDomain())); ?> </li> <?php continue; endif; ?> <?php if ($child->get("separator") === true): ?> <li class="divider"></li> <?php continue; endif; ?> <li<?php if ($child->isActive()) echo ' class="active"' ?>> <a href="<?php echo $child->getHref() ?>" <?php if ($child->getTarget() != ""): ?> target="<?php echo $child->getTarget(); ?>" <?php endif; ?>> <?php if ($child->get("icon") != ""): ?> <span class="icon"> <i class="<?php echo $child->get("icon"); ?>"></i> </span> <?php endif; ?> <?php echo $this->escapeHtml($this->translate($child->getLabel(), $this->navigation($container)->getTranslatorTextDomain())); ?> </a> </li> <?php endforeach ?> </ul> </li> <?php endif; ?> <?php endif ?> <?php endforeach ?> </ul>