Loading module/Information/config/module.config.php +1 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ return [ 'telecharger', ], 'privileges' => [ InformationPrivileges::INFORMATION_MODIFIER, InformationPrivileges::INFORMATION_FICHIER, ] ], ], Loading module/Information/src/Information/Provider/Privilege/InformationPrivileges.php +1 −0 Original line number Diff line number Diff line Loading @@ -12,4 +12,5 @@ use UnicaenAuth\Provider\Privilege\Privileges; class InformationPrivileges extends Privileges { const INFORMATION_MODIFIER = 'faq-modifier-information'; const INFORMATION_FICHIER = 'faq-modifier-fichier'; } No newline at end of file module/Information/view/information/fichier/index.phtml +9 −1 Original line number Diff line number Diff line Loading @@ -3,8 +3,11 @@ /** @var InformationFichier[] $fichiers */ use Information\Entity\Db\InformationFichier; use Information\Provider\Privilege\InformationPrivileges; $this->headTitle("Fichiers associées aux pages d'information") $this->headTitle("Fichiers associées aux pages d'information"); $canFichier = $this->isAllowed(InformationPrivileges::getResourceId(InformationPrivileges::INFORMATION_FICHIER)); ?> <style> Loading @@ -17,9 +20,12 @@ $this->headTitle("Fichiers associées aux pages d'information") Fichiers associées aux pages d'information </h1> <?php if ($canFichier) : ?> <h2> Téléversement d'un fichier </h2> <?php echo $this->form($form); ?> <?php endif; ?> <h2> Listing des fichiers téléversés pour le module informations </h2> Loading Loading @@ -54,9 +60,11 @@ $this->headTitle("Fichiers associées aux pages d'information") <?php echo $fichier->getDateCreation()->format("d/m/Y à H:i"); ?> </td> <td> <?php if ($canFichier) : ?> <a href="<?php echo $this->url("informations/fichiers/supprimer", ['id' => $fichier->getId()], [], true); ?>"> <span class="glyphicon glyphicon-remove"></span> </a> <?php endif; ?> </td> </tr> <?php endforeach; ?> Loading module/Information/view/information/information/index.phtml +6 −2 Original line number Diff line number Diff line Loading @@ -5,12 +5,14 @@ */ use Information\Entity\Db\Information; use Information\Provider\Privilege\InformationPrivileges; $this->headTitle("Index des informations"); $canView = true; $canEdit = true; $canDelete = true; $canEdit = $this->isAllowed(InformationPrivileges::getResourceId(InformationPrivileges::INFORMATION_MODIFIER)); $canDelete = $this->isAllowed(InformationPrivileges::getResourceId(InformationPrivileges::INFORMATION_MODIFIER)); $canFichier = $this->isAllowed(InformationPrivileges::getResourceId(InformationPrivileges::INFORMATION_FICHIER)); ?> <style> Loading @@ -30,12 +32,14 @@ $canDelete = true; Ajouter une page d'information </a> <?php if ($canFichier) : ?> <a href="<?php echo $this->url('informations/fichiers', [], [], true); ?>" class="btn btn-primary action" > <span class="glyphicon glyphicon-folder-open "></span> Gestion des fichiers </a> <?php endif; ?> <table class="table table-extra-condensed"> <thead> Loading Loading
module/Information/config/module.config.php +1 −1 Original line number Diff line number Diff line Loading @@ -115,7 +115,7 @@ return [ 'telecharger', ], 'privileges' => [ InformationPrivileges::INFORMATION_MODIFIER, InformationPrivileges::INFORMATION_FICHIER, ] ], ], Loading
module/Information/src/Information/Provider/Privilege/InformationPrivileges.php +1 −0 Original line number Diff line number Diff line Loading @@ -12,4 +12,5 @@ use UnicaenAuth\Provider\Privilege\Privileges; class InformationPrivileges extends Privileges { const INFORMATION_MODIFIER = 'faq-modifier-information'; const INFORMATION_FICHIER = 'faq-modifier-fichier'; } No newline at end of file
module/Information/view/information/fichier/index.phtml +9 −1 Original line number Diff line number Diff line Loading @@ -3,8 +3,11 @@ /** @var InformationFichier[] $fichiers */ use Information\Entity\Db\InformationFichier; use Information\Provider\Privilege\InformationPrivileges; $this->headTitle("Fichiers associées aux pages d'information") $this->headTitle("Fichiers associées aux pages d'information"); $canFichier = $this->isAllowed(InformationPrivileges::getResourceId(InformationPrivileges::INFORMATION_FICHIER)); ?> <style> Loading @@ -17,9 +20,12 @@ $this->headTitle("Fichiers associées aux pages d'information") Fichiers associées aux pages d'information </h1> <?php if ($canFichier) : ?> <h2> Téléversement d'un fichier </h2> <?php echo $this->form($form); ?> <?php endif; ?> <h2> Listing des fichiers téléversés pour le module informations </h2> Loading Loading @@ -54,9 +60,11 @@ $this->headTitle("Fichiers associées aux pages d'information") <?php echo $fichier->getDateCreation()->format("d/m/Y à H:i"); ?> </td> <td> <?php if ($canFichier) : ?> <a href="<?php echo $this->url("informations/fichiers/supprimer", ['id' => $fichier->getId()], [], true); ?>"> <span class="glyphicon glyphicon-remove"></span> </a> <?php endif; ?> </td> </tr> <?php endforeach; ?> Loading
module/Information/view/information/information/index.phtml +6 −2 Original line number Diff line number Diff line Loading @@ -5,12 +5,14 @@ */ use Information\Entity\Db\Information; use Information\Provider\Privilege\InformationPrivileges; $this->headTitle("Index des informations"); $canView = true; $canEdit = true; $canDelete = true; $canEdit = $this->isAllowed(InformationPrivileges::getResourceId(InformationPrivileges::INFORMATION_MODIFIER)); $canDelete = $this->isAllowed(InformationPrivileges::getResourceId(InformationPrivileges::INFORMATION_MODIFIER)); $canFichier = $this->isAllowed(InformationPrivileges::getResourceId(InformationPrivileges::INFORMATION_FICHIER)); ?> <style> Loading @@ -30,12 +32,14 @@ $canDelete = true; Ajouter une page d'information </a> <?php if ($canFichier) : ?> <a href="<?php echo $this->url('informations/fichiers', [], [], true); ?>" class="btn btn-primary action" > <span class="glyphicon glyphicon-folder-open "></span> Gestion des fichiers </a> <?php endif; ?> <table class="table table-extra-condensed"> <thead> Loading