#266 fix assignment view on the projector
This commit is contained in:
parent
ef5b9e3281
commit
ff44439351
@ -97,7 +97,7 @@
|
||||
<p><br></p>
|
||||
<h3>{% trans "Election results" %}</h3>
|
||||
|
||||
{% if polls %}
|
||||
{% if polls.exists %}
|
||||
<table id="election_table" style="width: auto;">
|
||||
|
||||
<tr>
|
||||
@ -160,8 +160,8 @@
|
||||
</td>
|
||||
{% for poll_dict in poll_list %}
|
||||
{% if perms.assignment.can_manage_assignment or poll_dict.published %}
|
||||
<td style="white-space:nowrap;">
|
||||
{% with vote=poll_dict.votes %}
|
||||
{% with vote=poll_dict.votes %}
|
||||
<td style="white-space:nowrap;">
|
||||
{% if 'Yes' in vote and 'No' in vote and 'Abstain' in vote %}
|
||||
<img src="{% static 'images/icons/voting-yes.png' %}" title="{% trans 'Yes' %}"> {{ vote.Yes }}<br>
|
||||
<img src="{% static 'images/icons/voting-no.png' %}" title="{% trans 'No' %}"> {{ vote.No }}<br>
|
||||
@ -173,8 +173,8 @@
|
||||
{% else %}
|
||||
|
||||
{% endif %}
|
||||
{% endwith %}
|
||||
</td>
|
||||
</td>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% if assignment.profile.exists and perms.assignment.can_manage_assignment and assignment.status == "vot" %}
|
||||
|
@ -5,10 +5,12 @@
|
||||
{% load staticfiles %}
|
||||
|
||||
{% block title %}{{ block.super }} - {{ assignment }}{% endblock %}
|
||||
|
||||
{% block header %}
|
||||
<link type="text/css" rel="stylesheet" media="all" href="{% static 'styles/assignment.css' %}" />
|
||||
<script type="text/javascript" src="{% static 'javascript/assignment.js' %}"></script>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{% if assignment.status != "fin" %}
|
||||
<div id="sidebar">
|
||||
@ -49,7 +51,7 @@
|
||||
{% if polls.exists %}
|
||||
<h3>{% trans "Election results" %}</h3>
|
||||
<table>
|
||||
|
||||
|
||||
<tr>
|
||||
<th>{% trans "Candidates" %}</th>
|
||||
{% for poll in assignment.poll_set.all %}
|
||||
@ -58,8 +60,8 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tr>
|
||||
|
||||
{% for candidate, votes in vote_results.items %}
|
||||
|
||||
{% for candidate, poll_list in vote_results.items %}
|
||||
<tr class="{% cycle 'odd' '' %}">
|
||||
<td class="candidate{% if candidate.1 %} elected{% endif %}">
|
||||
{% if candidate in assignment.elected.all %}
|
||||
@ -69,25 +71,28 @@
|
||||
{% endif %}
|
||||
{{ candidate }}
|
||||
</td>
|
||||
{% for vote in votes %}
|
||||
{# Hier stimmt es noch nicht. Es muss rein, dass nur veröffentlichte Wahlergebnisse angezeigt werden sollen #}
|
||||
<td style="white-space:nowrap;"{% if candidate in assignment.elected.all %} class="elected"{% endif %}>
|
||||
{% if 'Yes' in vote and 'No' in vote and 'Abstain' in vote %}
|
||||
<img src="{% static 'images/icons/voting-yes.png' %}" title="{% trans 'Yes' %}"> {{ vote.Yes }}<br>
|
||||
<img src="{% static 'images/icons/voting-no.png' %}" title="{% trans 'No' %}"> {{ vote.No }}<br>
|
||||
<img src="{% static 'images/icons/voting-abstention.png' %}" title="{% trans 'Abstention' %}"> {{ vote.Abstain }}<br>
|
||||
{% elif 'Votes' in vote %}
|
||||
<img src="{% static 'images/icons/voting-yes.png' %}" title="{% trans 'Yes' %}"> {{ vote.Votes }}
|
||||
{% elif vote == None %}
|
||||
{% trans 'was not a <br> candidate'%}
|
||||
{% else %}
|
||||
|
||||
{% endif %}
|
||||
</td>
|
||||
{% for poll_dict in poll_list %}
|
||||
{% if poll_dict.published %}
|
||||
{% with vote=poll_dict.votes %}
|
||||
<td style="white-space:nowrap;"{% if candidate in assignment.elected.all %} class="elected"{% endif %}>
|
||||
{% if 'Yes' in vote and 'No' in vote and 'Abstain' in vote %}
|
||||
<img src="{% static 'images/icons/voting-yes.png' %}" title="{% trans 'Yes' %}"> {{ vote.Yes }}<br>
|
||||
<img src="{% static 'images/icons/voting-no.png' %}" title="{% trans 'No' %}"> {{ vote.No }}<br>
|
||||
<img src="{% static 'images/icons/voting-abstention.png' %}" title="{% trans 'Abstention' %}"> {{ vote.Abstain }}<br>
|
||||
{% elif 'Votes' in vote %}
|
||||
<img src="{% static 'images/icons/voting-yes.png' %}" title="{% trans 'Yes' %}"> {{ vote.Votes }}
|
||||
{% elif vote == None %}
|
||||
{% trans 'was not a <br> candidate'%}
|
||||
{% else %}
|
||||
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
|
||||
<tr>
|
||||
<td>{%trans 'Invalid votes' %}</td>
|
||||
{% for poll in polls %}
|
||||
@ -96,7 +101,7 @@
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tr>
|
||||
|
||||
|
||||
<tr class="total">
|
||||
<td><b>{%trans 'Votes cast' %}</b></td>
|
||||
{% for poll in polls %}
|
||||
|
Loading…
Reference in New Issue
Block a user