fix when choices are added after some votes
authorJulien Moutinho <julm+cavote@autogeree.net>
Mon, 20 Oct 2014 14:31:54 +0000 (16:31 +0200)
committerJulien Moutinho <julm+cavote@autogeree.net>
Mon, 20 Oct 2014 14:31:54 +0000 (16:31 +0200)
static/css/cavote.css
templates/vote.html

index 397a8ef..a2fae05 100644 (file)
     vertical-align: middle;
 }
 
+.table-votes td.choice-after-vote {
+       border:2px solid red;
+ }
+
 .table-votes .yes {
     background-color: #46a546; /* green */
     /*background-color: #049cdb;*/ /* blue */
index 5d1e4c6..f86aaf9 100644 (file)
     <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="{{user.choices[choice.id].class}}"><span>{{ user.choices[choice.id].name }}</span></td>
+      {% else %}
+      <td class="choice-after-vote"><span>Choix postérieur au suffrage</span></td>
+      {% endif %}
       {% endfor %}
       {% if 'user' in session and (can_vote or (not vote['is_terminated'] and not vote['is_anonymous'])) %}
       <td class="ok">{% if user.userid == session.user.id %}