- {% if vote.is_transparent %}
- <!-- :TODO:maethor:20120528: Afficher les votes ici -->
- {% else %}
- <div class="alert alert-info">Ce sondage n'est pas transparent, vous ne pouvez pas voir les votes des autres.</div>
- <!-- :TODO:maethor:20120528: Afficher le vote de l'utilisateur -->
+ {% for user in users %}
+ {% if vote.is_transparent or user.userid == session.user.id %}
+ <tr>
+ <th>{% if 'user' in session and user.userid == session.user.id %}<i class="icon-user"></i>{% endif %} {{ user.username }}</th>
+ {% for choice in choices %}
+ {% if choice.id in user.choices %}
+ <td class="yes"><i class="icon-ok icon-white"></i></td>
+ {% else %}
+ <td class="no"></td>{% endif %}
+ {% endfor %}
+ {% if 'user' in session %}
+ <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>
+ {% endif %}
+ </tr>