#278: Used cycle rowcolor in vote results table also for inavlid votes row

This commit is contained in:
Emanuel Schuetze 2012-11-19 23:52:48 +01:00
parent 0fbb7dced3
commit 5e97ece5f4
2 changed files with 4 additions and 7 deletions

View File

@ -145,7 +145,7 @@
</tr> </tr>
{% for candidate, poll_list in vote_results.items %} {% for candidate, poll_list in vote_results.items %}
<tr class="{% cycle 'odd' '' %}"> <tr class="{% cycle 'odd' '' as rowcolors %}">
<td class="candidate"> <td class="candidate">
{% if candidate in assignment.elected %} {% if candidate in assignment.elected %}
{% if perms.assignment.can_manage_assignment %} {% if perms.assignment.can_manage_assignment %}
@ -182,8 +182,7 @@
{% endif %} {% endif %}
</tr> </tr>
{% endfor %} {% endfor %}
<tr class="{% cycle rowcolors %}">
<tr>
<td>{% trans 'Invalid votes' %}</td> <td>{% trans 'Invalid votes' %}</td>
{% for poll in polls %} {% for poll in polls %}
{% if poll.published or perms.assignment.can_manage_assignment %} {% if poll.published or perms.assignment.can_manage_assignment %}

View File

@ -62,7 +62,7 @@
</tr> </tr>
{% for candidate, poll_list in vote_results.items %} {% for candidate, poll_list in vote_results.items %}
<tr class="{% cycle 'odd' '' %}"> <tr class="{% cycle 'odd' '' as rowcolors %}">
<td class="candidate{% if candidate in assignment.elected %} elected{% endif %}"> <td class="candidate{% if candidate in assignment.elected %} elected{% endif %}">
{% if candidate in assignment.elected %} {% if candidate in assignment.elected %}
<a class="elected"> <a class="elected">
@ -92,8 +92,7 @@
{% endfor %} {% endfor %}
</tr> </tr>
{% endfor %} {% endfor %}
<tr class="{% cycle rowcolors %}">
<tr>
<td>{% trans 'Invalid votes' %}</td> <td>{% trans 'Invalid votes' %}</td>
{% for poll in polls %} {% for poll in polls %}
<td style="white-space:nowrap;"> <td style="white-space:nowrap;">
@ -105,7 +104,6 @@
{% endfor %} {% endfor %}
</tr> </tr>
<tr class="total"> <tr class="total">
<td> <td>
<strong>{% trans 'Votes cast' %}</strong> <strong>{% trans 'Votes cast' %}</strong>