Administration des users et des votes
[cavote.git] / templates / admin_votes.html
diff --git a/templates/admin_votes.html b/templates/admin_votes.html
new file mode 100644 (file)
index 0000000..e32ff33
--- /dev/null
@@ -0,0 +1,49 @@
+{% extends "layout.html" %}
+{% block subtitle %}Administrer les votes{% endblock %}
+{% block body %}
+<div class="row">
+  <hr />
+  {% if not votes %}
+  <div class="alert">Il n'y a aucun vote.</div>
+  {% else %}
+  <table class="table table-striped">
+    <thead>
+    <tr>
+      <th>Nom</th>
+      <th>Statut</th>
+      <th>Deadline</th>
+      <th>Groupe</th>
+      <th>Catégorie</th>
+      <th>Options</th>
+      <th>Actions</th>
+    </tr>
+    </thead>
+    <tbody>
+    {% for vote in votes %}
+    <tr>
+      <td>{{ vote.title }}</td>
+      <td>{% if vote.is_open %}<span class="label label-success">Ouvert</span>{% else %}<span class="label label-important">Fermé</span>{% endif %}</td>
+      <td>{{ vote.date_end }}</td>
+      <td>{{ vote.rolename }}</td>
+      <td>{{ vote.category }}</td>
+      <td>
+        {% if vote.is_transparent %}<span class="label">transparent</span>{% endif %}
+        {% if vote.is_public %}<span class="label">public</span>{% endif %}
+        {% if vote.is_multiplechoice %}<span class="label">choix multiple</span>{% endif %}
+      </td>
+      <td><a href="{{ url_for('edit_vote', voteid=vote.id) }}" class="btn btn-mini">Éditer</a></td>
+    </tr>
+    {% endfor %}
+    </tbody>
+  </table>
+  <p>
+  <strong>Légende :</strong>
+  <ul class="unstyled">
+    <li><span class="label">transparent</span> : Les utilisateurs peuvent voir les votes des autres</li>
+    <li><span class="label">public</span> : Tout le monde peut voir le vote</li>
+    <li><span class="label">choix multiple</span> : Les utilisateurs peuvent effectuer plusieurs choix</li>
+  </ul>
+  </p>
+  {% endif %}
+{% endblock %}
+