b97e45a0b31582c01c695a5d653aa68d138021dc
[cavote.git] / templates / admin_votes.html
1 {% extends "layout.html" %}
2 {% block subtitle %}Administrer les votes{% endblock %}
3 {% block body %}
4 <div class="row">
5 <a class="pull-right btn btn-primary btn-small" href="{{ url_for('admin_vote_add') }}">+ Nouveau vote</a>
6 {% if not votes %}
7 <div class="alert">Il n'y a aucun vote.</div>
8 {% else %}
9 <table class="table table-striped">
10 <thead>
11 <tr>
12 <th>Nom</th>
13 <th>Statut</th>
14 <th>Deadline</th>
15 <th>Groupe</th>
16 <th>Catégorie</th>
17 <th>Options</th>
18 <th>Actions</th>
19 </tr>
20 </thead>
21 <tbody>
22 {% for vote in votes %}
23 <tr>
24 <td>{{ vote.title }}</td>
25 <td>{% if vote.is_terminated %}<span class="label label-success">Terminé</span>{% else %}{% if vote.is_open %}<span class="label label-info">Ouvert</span>{% else %}<span class="label label-important">Fermé</span>{% endif %}{% endif %}</td>
26 <td><span {% if vote.date_end < today %}style="color: red;"{% endif %}>{{ vote.date_end }}</span></td>
27 <td>{{ vote.groupname }}</td>
28 <td>{{ vote.category }}</td>
29 <td>
30 {% if vote.is_transparent %}<span class="label">transparent</span>{% endif %}
31 {% if vote.is_public %}<span class="label">public</span>{% endif %}
32 {% if vote.is_multiplechoice %}<span class="label">multiple</span>{% endif %}
33 </td>
34 <td>
35 <a href="{{ url_for('vote', idvote=vote.voteid) }}" class="btn btn-success btn-mini">Voir</a>
36 <a href="{{ url_for('admin_vote_edit', voteid=vote.voteid) }}" class="btn btn-mini">Éditer</a>
37 </td>
38 </tr>
39 {% endfor %}
40 </tbody>
41 </table>
42 <a class="pull-right btn btn-primary btn-small" href="{{ url_for('admin_vote_add') }}">+ Nouveau vote</a>
43 <p>
44 <strong>Légende :</strong>
45 <ul class="unstyled">
46 <li><span class="label">transparent</span> : Les utilisateurs peuvent voir les votes des autres</li>
47 <li><span class="label">public</span> : Tout le monde peut voir le vote</li>
48 <li><span class="label">multiple</span> : Les utilisateurs peuvent effectuer plusieurs choix</li>
49 </ul>
50 </p>
51 {% endif %}
52 </div>
53 {% endblock %}
54