Gestion des droits d'accès aux pages

This commit is contained in:
Charlie Mathey
2024-05-23 10:00:04 +02:00
parent e135d41338
commit 6bb8872ca6
5 changed files with 24 additions and 13 deletions

View File

@ -1,11 +1,13 @@
{{#restrict section="accounting" level="write" block=true}}{{/restrict}}
{{#restrict block=true}}{{/restrict}}
{{:admin_header title="Liste des scrutins"}}
<nav class="tabs">
<aside>
{{:linkbutton href="edit.html" label="Nouveau scrutin" shape="plus"}}
</aside>
</nav>
{{#restrict section="users" level="admin"}}
<nav class="tabs">
<aside>
{{:linkbutton href="edit.html" label="Nouveau scrutin" shape="plus"}}
</aside>
</nav>
{{/restrict}}
{{#list select="$$.name AS 'Scrutin'" order=1 desc=true}}
{{:assign var="qs" name=$name desc=$desc question=$question activity_see=$activity_see}}
@ -24,8 +26,10 @@
<td class="actions">
{{:linkbutton href="result.html?id=%d"|args:$id label="Voir les résultats" shape="eye"}}
{{:linkbutton href="vote.html?id=%d"|args:$id label="Voter" shape="check"}}
{{:linkbutton href="edit.html?id=%d"|args:$id label="Modifier" shape="edit"}}
{{:linkbutton target="_dialog" href="delete.html?id=%d"|args:$id label="Supprimer" shape="delete"}}
{{#restrict section="users" level="admin"}}
{{:linkbutton href="edit.html?id=%d"|args:$id label="Modifier" shape="edit"}}
{{:linkbutton target="_dialog" href="delete.html?id=%d"|args:$id label="Supprimer" shape="delete"}}
{{/restrict}}
</td>
</tr>
{{else}}