#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 %}
|
||||
<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>
|
||||
{% 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">
|
||||
|
@ -59,7 +61,7 @@
|
|||
{% 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,8 +71,9 @@
|
|||
{% endif %}
|
||||
{{ candidate }}
|
||||
</td>
|
||||
{% for vote in votes %}
|
||||
{# Hier stimmt es noch nicht. Es muss rein, dass nur veröffentlichte Wahlergebnisse angezeigt werden sollen #}
|
||||
{% 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>
|
||||
|
@ -84,6 +87,8 @@
|
|||
|
||||
{% endif %}
|
||||
</td>
|
||||
{% endwith %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
|
Loading…
Reference in New Issue