{% extends "layout.html" %}
+{% block subtitle %}
+Liste des votes
+{% endblock %}
{% block body %}
- <h2>Administration - Liste des votes</h2>
-
- <h3> Votes </h3>
- {% if session.logged_in %}
- <form action="{{ url_for('add_vote') }}" method=post class=add-vote>
- <dl>
- <dt>Titre :
- <dd><input type=text size=30 name=title>
- <dt>Description :
- <dd><textarea name=description rows=5 cols=40></textarea>
- <dd><input type=submit value=Paf>
- </dl>
- </form>
- {% endif %}
- <ul class=votes>
{% for vote in votes %}
- <li><h2>{{ vote.title }} - {{ vote.description|safe }} </h2>
- {{ vote.date }}
+ <article>
+ <div class="row well">
+ <div class="span4">
+ <h3><a href="{{ url_for('show_vote', idvote=vote.id) }}">{{ vote.title }}</a></h3>
+ <div class="progress progress-striped">
+ <div class="bar" style="width: 60{{ vote.percent }}%;"></div>
+ </div>
+ </div>
+ <div class="span3">
+ <h4>Deadline : {{ vote.date_end }} </h4>
+ <h4>Groupe : {{ vote.rolename }}</h4>
+ <h4>Categorie : {{ vote.category }}</h4>
+ </div>
+ <div class="span3">
+ <h4>Notes</h4>
+ <p>
+ {{ vote.description|safe }}
+ </p>
+ </div>
+ </article>
{% else %}
- <li><em>Pas encore de votes</em>
+ <div class="alert">Il n'y a pas encore de votes. Désolé.</div>
{% endfor %}
- </ul>
- Retour à l'<a href="/">accueil</a>
-
{% endblock %}
-