1 {% extends
"layout.html" %}
5 <h2 class='page-header'
>{{ vote.title }}
</h2>
6 {% if not vote.is_transparent %}
7 <div class=
"alert alert-info">Ce sondage n'est pas transparent, vous ne pouvez pas voir les votes des autres.
</div>
10 <table class=
"table table-condensed table-bordered table-votes">
14 {% for choice in choices %}
15 <th>{{ choice.name }}
</th>
17 {% if 'user' in session %}
24 {% for user in users %}
25 {% if vote.is_transparent or user.userid == session.user.id %}
27 <th>{% if 'user' in session and user.userid == session.user.id %}
<i class=
"icon-user"></i>{% endif %} {{ user.username }}
</th>
28 {% for choice in choices %}
29 {% if choice.id in user.choices %}
30 <td class=
"yes"><i class=
"icon-ok icon-white"></i></td>
32 <td class=
"no"></td>{% endif %}
34 {% if 'user' in session %}
35 <td>{% if user.userid == session.user.id %}
<a href=
"{{ url_for('vote_deletechoices', idvote=vote.id, iduser=session.user.id) }}" class=
"btn btn-mini btn-danger" title=
"Supprimer"><i class=
"icon-remove icon-white"></a>{% endif %}
</td>
42 <form class=
"form-inline" action=
"{{ url_for('vote', idvote=vote.id) }}" method=
"post">
44 <th><input type='text'
name=
"username" value='{{ session.user.name }}' disabled
/></th>
45 {% if vote.is_multiplechoice %}
46 {% for choice in choices %}
47 <td><input type='checkbox'
name=
"{{ choice.id }}" value=
"{{ choice.id }}" /></td>
50 {% for choice in choices %}
51 <td><input type='radio'
name=
"choice" value=
"{{ choice.id }}" /></td>
54 <td><input type=
"submit" class=
"btn btn-primary" value=
"OK" /></td>
61 {% if vote.is_transparent %}
64 {% for choice in choices %}
65 <td>{{ choice.nb }}
</td>
67 {% if 'user' in session %}
78 {% if vote.nb_votes ==
0 %}
79 <div class=
"progress progress-striped progress-danger">
80 <div class=
"bar" style=
"width: 100%;"><strong>{{ vote.nb_votes }} / {{ vote.max_votes }}
</strong></div>
83 <div class=
"progress progress-striped {% if vote.nb_votes == vote.max_votes %}progress-success{% endif %}">
84 <div class=
"bar" style=
"width: {{ vote.percent }}%;"><strong>{{ vote.nb_votes }} / {{ vote.max_votes }}
</strong></div>
87 <dl class=
"dl-horizontal">
88 <dt>Publié par
<dd><code>maethor
</code>
89 <dt>Début le
<dd><code>{{ vote.date_begin }}
</code>
90 <dt>Deadline le
<dd><code>{{ vote.date_end }}
</code>
91 <dt>Groupe
<dd><code>{{ vote.groupname }}
</code>
92 <dt>Catégorie
<dd><code>{{ vote.category }}
</code>
95 {% if vote.description %}
96 <dt>Description :
<dd>{{ vote.description }}
101 {% for attachment in attachments %}
102 <li><a href=
"{{ attachment.url }}">{{ attachment.url }}
</a></li>