Loading CHANGELOG.md +4 −0 Original line number Diff line number Diff line Loading @@ -6,3 +6,7 @@ Journal des modifications - Mise en place du changelog - Réintégration de l'AssertionFactory, à utiliser pour les assertions - [Fix] erreur ns \InvalidArgumentException : \ ajouté 5.0.7 (05/05/2023) ----- - Correction bug d'affichage sur le tableau d'affectation lorsque deux catégories possèdent le même libellé config/merged/privilege.config.php +1 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ return [ 'options' => [ 'route' => '/privilege', 'defaults' => [ /** @see PrivilegeController::indexAction() */ 'controller' => PrivilegeController::class, 'action' => 'index', ], Loading src/UnicaenPrivilege/Service/Privilege/PrivilegeService.php +1 −1 Original line number Diff line number Diff line Loading @@ -147,7 +147,7 @@ class PrivilegeService extends CommonService implements PrivilegeProviderInterfa foreach ($categories as $c) { $privileges = $this->findByCategorie($c); if(count($privileges) > 0) { $privilegesByCategorie[$c->getLibelle()] = $privileges; $privilegesByCategorie[$c->getId()] = $privileges; } } Loading src/UnicaenPrivilege/View/Privilege/PrivilegeViewHelper.php +2 −1 Original line number Diff line number Diff line Loading @@ -90,9 +90,10 @@ class PrivilegeViewHelper extends AbstractHelper public function renderStatut($role) { $check = $this->privilege->hasRole($role); $html = '<td class="role-privilege-statut text-center %s" style="border-right: 1px solid #ddd;">%s</td>'; $html = '<td class="role-privilege-statut text-center %s" style="border-right: 1px solid #ddd;" title="%s">%s</td>'; return sprintf($html, $check ? 'success' : 'danger', ($check? 'Ajouter' : 'Retirer') . " le privilège [".$this->privilege->getCategorie()->getLibelle()."|".$this->privilege->getLibelle()."] au rôle [".$role->getLibelle()."]", $check ? $this->renderLienSupprimer($role) : $this->renderLienAjouter($role) ); } Loading view/unicaen-privilege/privilege/index.phtml +6 −6 Original line number Diff line number Diff line <?php use UnicaenAuth\Entity\Db\RoleInterface; use UnicaenPrivilege\Entity\Db\PrivilegeInterface; use UnicaenPrivilege\Form\Privilege\CategorieFiltreForm; use UnicaenPrivilege\Provider\Privilege\PrivilegePrivileges; use UnicaenUtilisateur\Entity\Db\RoleInterface; /** * @var RoleInterface[] $roles Loading Loading @@ -89,11 +88,12 @@ $this->headTitle("Gestion des privilèges"); </tr> </thead> <tbody> <?php foreach ($privilegesByCategorie as $libelleCategorie => $privileges) : ?> <?php foreach ($privilegesByCategorie as $categorieId => $privileges) : ?> <tr> <th id="<?php echo current($privileges)->getCategorie()->getId(); ?>" class="categorie" colspan="<?php echo 1 + count($roles); ?>"><?php echo $libelleCategorie; ?> <i class="fas fa-caret-square-down text-muted"></i></th> <th id="<?php echo $categorieId; ?>" class="categorie" colspan="<?php echo 1 + count($roles); ?>"> <?php echo current($privileges)->getCategorie()->getLibelle(); ?> <i class="fas fa-caret-square-down text-muted"></i> </th> </tr> <?php /** @var PrivilegeInterface $privilege */ ?> <?php foreach ($privileges as $privilege) : ?> Loading Loading
CHANGELOG.md +4 −0 Original line number Diff line number Diff line Loading @@ -6,3 +6,7 @@ Journal des modifications - Mise en place du changelog - Réintégration de l'AssertionFactory, à utiliser pour les assertions - [Fix] erreur ns \InvalidArgumentException : \ ajouté 5.0.7 (05/05/2023) ----- - Correction bug d'affichage sur le tableau d'affectation lorsque deux catégories possèdent le même libellé
config/merged/privilege.config.php +1 −0 Original line number Diff line number Diff line Loading @@ -120,6 +120,7 @@ return [ 'options' => [ 'route' => '/privilege', 'defaults' => [ /** @see PrivilegeController::indexAction() */ 'controller' => PrivilegeController::class, 'action' => 'index', ], Loading
src/UnicaenPrivilege/Service/Privilege/PrivilegeService.php +1 −1 Original line number Diff line number Diff line Loading @@ -147,7 +147,7 @@ class PrivilegeService extends CommonService implements PrivilegeProviderInterfa foreach ($categories as $c) { $privileges = $this->findByCategorie($c); if(count($privileges) > 0) { $privilegesByCategorie[$c->getLibelle()] = $privileges; $privilegesByCategorie[$c->getId()] = $privileges; } } Loading
src/UnicaenPrivilege/View/Privilege/PrivilegeViewHelper.php +2 −1 Original line number Diff line number Diff line Loading @@ -90,9 +90,10 @@ class PrivilegeViewHelper extends AbstractHelper public function renderStatut($role) { $check = $this->privilege->hasRole($role); $html = '<td class="role-privilege-statut text-center %s" style="border-right: 1px solid #ddd;">%s</td>'; $html = '<td class="role-privilege-statut text-center %s" style="border-right: 1px solid #ddd;" title="%s">%s</td>'; return sprintf($html, $check ? 'success' : 'danger', ($check? 'Ajouter' : 'Retirer') . " le privilège [".$this->privilege->getCategorie()->getLibelle()."|".$this->privilege->getLibelle()."] au rôle [".$role->getLibelle()."]", $check ? $this->renderLienSupprimer($role) : $this->renderLienAjouter($role) ); } Loading
view/unicaen-privilege/privilege/index.phtml +6 −6 Original line number Diff line number Diff line <?php use UnicaenAuth\Entity\Db\RoleInterface; use UnicaenPrivilege\Entity\Db\PrivilegeInterface; use UnicaenPrivilege\Form\Privilege\CategorieFiltreForm; use UnicaenPrivilege\Provider\Privilege\PrivilegePrivileges; use UnicaenUtilisateur\Entity\Db\RoleInterface; /** * @var RoleInterface[] $roles Loading Loading @@ -89,11 +88,12 @@ $this->headTitle("Gestion des privilèges"); </tr> </thead> <tbody> <?php foreach ($privilegesByCategorie as $libelleCategorie => $privileges) : ?> <?php foreach ($privilegesByCategorie as $categorieId => $privileges) : ?> <tr> <th id="<?php echo current($privileges)->getCategorie()->getId(); ?>" class="categorie" colspan="<?php echo 1 + count($roles); ?>"><?php echo $libelleCategorie; ?> <i class="fas fa-caret-square-down text-muted"></i></th> <th id="<?php echo $categorieId; ?>" class="categorie" colspan="<?php echo 1 + count($roles); ?>"> <?php echo current($privileges)->getCategorie()->getLibelle(); ?> <i class="fas fa-caret-square-down text-muted"></i> </th> </tr> <?php /** @var PrivilegeInterface $privilege */ ?> <?php foreach ($privileges as $privilege) : ?> Loading