Users can see waiting votes, votes can be terminated
[cavote.git] / templates / vote.html
index 86b020d..8d6e9dd 100644 (file)
@@ -14,7 +14,9 @@
       {% for choice in choices %}
       <th>{{ choice.name }}</th>
       {% endfor %}
+      {% if 'user' in 'session' %}
       <th></th>
+      {% endif %}
     </tr>
   </thead>
 
@@ -29,7 +31,9 @@
       {% else %}
       <td class="no"></td>{% endif %}
       {% endfor %}
-      <td>{% if 'user' in session and 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>
+      {% 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>
   {% endif %}
   {% endfor %}
@@ -60,7 +64,9 @@
       {% for choice in choices %}
       <td>{{ choice.nb }}</td>
       {% endfor %}
+      {% if 'user' in 'session' %}
       <td></td>
+      {% endif %}
     </tr>
   {% endif %}
   </tfoot>