7b01e67d1bee58415f682f8a89332e34c00b376b
[cavote.git] / templates / votes.html
1 {% extends "layout.html" %}
2 {% block subtitle %}
3 Liste des votes
4 {% endblock %}
5 {% block body %}
6 {% for vote in votes %}
7 <div>
8 <div class="row well">
9 <div class="span5">
10 <h3><a href="{{ url_for('vote', idvote=vote.voteid) }}">{{ vote.title }}</a></h3>
11 <div class="row">
12 <div class="span4">
13 <div class="progress progress-striped progress-{% if vote.nb_votes > 0 and vote.nb_votes / vote.max_votes >= vote.quorum %}success{% else %}danger{% endif %}">
14 <div class="bar" style="width: {{ vote.percent }}%;">
15 <strong>{{ vote.nb_votes }} vote{{ 's' if vote.nb_votes > 1 else '' }} / {{ vote.max_votes }} ({{ vote.percent }}%)</strong></div>
16 </div>
17 </div>
18 </div>
19 </div>
20 <div class="span3">
21 <h4>Échéance : {{ vote.date_end }} </h4>
22 <h4>Groupe : {{ vote.groupname }}</h4>
23 <h4>Categorie : {{ vote.category }}</h4>
24 </div>
25 <div class="span3">
26 {% if vote.description %}
27 <h4>Description</h4>
28 <p>
29 {{ vote.description }}
30 </p>
31 {% endif %}
32 </div>
33 </div>
34 {% else %}
35 <div class="alert">Il n'y a pas encore de vote. Désolé.</div>
36 {% endfor %}
37 {% endblock %}