Skip to content
Snippets Groups Projects
Commit ef057002 authored by Bertrand Gauthier's avatar Bertrand Gauthier
Browse files

Droits d'accès > Tableau "Privilèges" : mention des libellés du privilège et...

Droits d'accès > Tableau "Privilèges" : mention des libellés du privilège et du rôle dans l'infobulle de la coche pour mieux se repérer dans le tableau.
parent 750c7019
No related branches found
No related tags found
No related merge requests found
...@@ -5,19 +5,29 @@ use UnicaenAuth\Provider\Privilege\Privileges; ...@@ -5,19 +5,29 @@ use UnicaenAuth\Provider\Privilege\Privileges;
/* @var $role UnicaenAuth\Entity\Db\Role */ /* @var $role UnicaenAuth\Entity\Db\Role */
/* @var $privilege UnicaenAuth\Entity\Db\Privilege */ /* @var $privilege UnicaenAuth\Entity\Db\Privilege */
$canEdit = $this->isAllowed('privilege/'.Privileges::DROIT_PRIVILEGE_EDITION); $canEdit = $this->isAllowed(Privileges::getResourceId(Privileges::DROIT_PRIVILEGE_EDITION));
if ($privilege->getRole()->contains($role)):
?> ?>
<?php if ($canEdit): ?><a href="javascript:void(0)" data-action="refuser" title="Privilège accordé. Cliquez pour le retirer."><?php endif; ?> <?php if ($privilege->getRole()->contains($role)): ?>
<?php if ($canEdit): ?>
<a href="javascript:void(0)" data-action="refuser"
title="Privilège '<?php echo $privilege->getCategorie() ?> > '<?php echo $privilege ?>' accordé au rôle '<?php echo $role ?>'. Cliquez pour le retirer.">
<?php endif; ?>
<span class="glyphicon glyphicon-ok text-success"></span> <span class="glyphicon glyphicon-ok text-success"></span>
<?php if ($canEdit): ?></a><?php endif; ?> <?php if ($canEdit): ?>
</a>
<?php endif; ?>
<?php else: ?> <?php else: ?>
<?php if ($canEdit): ?><a href="javascript:void(0)" data-action="accorder" title="Privilège refusé. Cliquez pour l'accorder."><?php endif; ?> <?php if ($canEdit): ?>
<a href="javascript:void(0)" data-action="accorder"
title="Privilège '<?php echo $privilege->getCategorie() ?> > <?php echo $privilege ?>' refusé au rôle '<?php echo $role ?>'. Cliquez pour l'accorder.">
<?php endif; ?>
<span class="glyphicon glyphicon-remove text-danger refuse"></span> <span class="glyphicon glyphicon-remove text-danger refuse"></span>
<?php if ($canEdit): ?></a><?php endif; ?> <?php if ($canEdit): ?>
</a>
<?php endif; ?>
<?php endif; ?> <?php endif; ?>
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment