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 (session.user and 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 %}
36 <a href=
"#delete" data-toggle=
"modal" class=
"btn btn-danger btn-mini" title=
"Supprimer"><i class=
"icon-remove icon-white"></i></a>
37 <div class=
"modal hide fade" id=
"delete">
38 <div class=
"modal-header">
39 <button type=
"button" class=
"close" data-dismiss=
"modal">×
</button>
40 <h3>Suppression de votre vote
</h3>
42 <div class=
"modal-body">
43 <p>Voulez-vous vraiment supprimer votre vote ?
</p>
45 <div class=
"modal-footer">
46 <a href=
"{{ url_for('vote_deletechoices', idvote=vote.id, iduser=session.user.id) }}" class=
"btn btn-danger">Confirmer
</a>
47 <a href=
"#" class=
"btn" data-dismiss=
"modal">Annuler
</a>
57 <form class=
"form-inline" action=
"{{ url_for('vote', idvote=vote.id) }}" method=
"post">
59 <th><input type='text'
name=
"username" value='{{ session.user.name }}' disabled
/></th>
60 {% if vote.is_multiplechoice %}
61 {% for choice in choices %}
62 <td><input type='checkbox'
name=
"{{ choice.id }}" value=
"{{ choice.id }}" /></td>
65 {% for choice in choices %}
66 <td><input type='radio'
name=
"choice" value=
"{{ choice.id }}" /></td>
69 <td><input type=
"submit" class=
"btn btn-primary" value=
"OK" /></td>
76 {% if vote.is_transparent %}
79 {% for choice in choices %}
80 <td>{{ choice.nb }}
</td>
82 {% if 'user' in session %}
93 {% if vote.nb_votes ==
0 %}
94 <div class=
"progress progress-striped progress-danger">
95 <div class=
"bar" style=
"width: 100%;"><strong>{{ vote.nb_votes }} / {{ vote.max_votes }}
</strong></div>
98 <div class=
"progress progress-striped {% if vote.nb_votes == vote.max_votes %}progress-success{% endif %}">
99 <div class=
"bar" style=
"width: {{ vote.percent }}%;"><strong>{{ vote.nb_votes }} / {{ vote.max_votes }}
</strong></div>
102 <dl class=
"dl-horizontal">
103 <dt>Publié par
<dd><code>{{ vote.author }}
</code>
104 <dt>Début le
<dd><code>{{ vote.date_begin }}
</code>
105 <dt>Deadline le
<dd><code>{{ vote.date_end }}
</code>
106 <dt>Groupe
<dd><code>{{ vote.groupname }}
</code>
107 <dt>Catégorie
<dd><code>{{ vote.category }}
</code>
110 {% if vote.description %}
111 <dt>Description :
<dd>{{ vote.description }}
116 {% for attachment in attachments %}
117 <li><a href=
"{{ attachment.url }}">{{ attachment.url }}
</a></li>