Users can see waiting votes, votes can be terminated
[cavote.git] / templates / admin_votes.html
index 9ce015a..e3faf72 100644 (file)
     {% for vote in votes %}
     <tr>
       <td>{{ vote.title }}</td>
-      <td>{% if vote.is_open %}<span class="label label-success">Ouvert</span>{% else %}<span class="label label-important">Fermé</span>{% endif %}</td>
+      <td>{% if vote.is_terminated %}<span class="label label-sucess">Terminé</span>{% else %}{% if vote.is_open %}<span class="label label-info">Ouvert</span>{% else %}<span class="label label-important">Fermé</span>{% endif %}{% endif %}</td>
       <td>{{ vote.date_end }}</td>
-      <td>{{ vote.rolename }}</td>
+      <td>{{ vote.groupname }}</td>
       <td>{{ vote.category }}</td>
       <td>
         {% if vote.is_transparent %}<span class="label">transparent</span>{% endif %}
         {% if vote.is_public %}<span class="label">public</span>{% endif %}
         {% if vote.is_multiplechoice %}<span class="label">choix multiple</span>{% endif %}
       </td>
-      <td><a href="{{ url_for('admin_vote_edit', voteid=vote.id) }}" class="btn btn-mini">Éditer</a></td>
+      <td>
+        <a href="{{ url_for('vote', idvote=vote.voteid) }}" class="btn btn-success btn-mini">Voir</a>
+        <a href="{{ url_for('admin_vote_edit', voteid=vote.voteid) }}" class="btn btn-mini">Éditer</a>
+      </td>
     </tr>
     {% endfor %}
     </tbody>