39 lines
1.3 KiB
HTML
39 lines
1.3 KiB
HTML
{{#restrict block=true}}{{/restrict}}
|
|
{{:admin_header title="Liste des scrutins"}}
|
|
|
|
{{#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}}
|
|
{{:assign qs=$qs|http_build_query}}
|
|
{{:assign url="!voter/results.php?%s"|args:$qs}}
|
|
{{*Forbid visibility if not member of activity*}}
|
|
{{if $activity_see}}
|
|
{{#sql select="*" tables="services_users" where="id_service = :id_act AND id_user = :id_user" :id_act=$activity_see :id_user=$logged_user.id count="TRUE"}}
|
|
{{if !$count}}
|
|
{{:continue 2}}
|
|
{{/if}}
|
|
{{/sql}}
|
|
{{/if}}
|
|
<tr>
|
|
<th>{{$name}}</th>
|
|
<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"}}
|
|
{{#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}}
|
|
<p class="alert block">
|
|
Aucun scrutin.
|
|
</p>
|
|
{{/list}} |