votes.html 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  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. {% if vote.nb_votes == 0 %}
  14. <div class="progress progress-striped progress-danger">
  15. <div class="bar" style="width: 100%;"><strong>{{ vote.nb_votes }} / {{ vote.max_votes }}</strong></div>
  16. </div>
  17. {% else %}
  18. <div class="progress progress-striped {% if vote.nb_votes == vote.max_votes %}progress-success{% endif %}">
  19. <div class="bar" style="width: {{ vote.percent }}%;"><strong>{{ vote.nb_votes }} / {{ vote.max_votes }}</strong></div>
  20. </div>
  21. {% endif %}
  22. </div>
  23. </div>
  24. </div>
  25. <div class="span3">
  26. <h4>Deadline : {{ vote.date_end }} </h4>
  27. <h4>Groupe : {{ vote.groupname }}</h4>
  28. <h4>Categorie : {{ vote.category }}</h4>
  29. </div>
  30. <div class="span3">
  31. {% if vote.description %}
  32. <h4>Description</h4>
  33. <p>
  34. {{ vote.description }}
  35. </p>
  36. {% endif %}
  37. </div>
  38. </div>
  39. {% else %}
  40. <div class="alert">Il n'y a pas encore de vote. Désolé.</div>
  41. {% endfor %}
  42. {% endblock %}