From ff444393510d9bf93d0d5910c97bdffd10838298 Mon Sep 17 00:00:00 2001 From: Oskar Hahn Date: Wed, 4 Jul 2012 16:14:19 +0200 Subject: [PATCH] #266 fix assignment view on the projector --- .../assignment/templates/assignment/view.html | 10 ++--- .../templates/projector/Assignment.html | 45 ++++++++++--------- 2 files changed, 30 insertions(+), 25 deletions(-) diff --git a/openslides/assignment/templates/assignment/view.html b/openslides/assignment/templates/assignment/view.html index 73f7fc98d..63b1527e1 100644 --- a/openslides/assignment/templates/assignment/view.html +++ b/openslides/assignment/templates/assignment/view.html @@ -97,7 +97,7 @@


{% trans "Election results" %}

-{% if polls %} +{% if polls.exists %} @@ -160,8 +160,8 @@ {% for poll_dict in poll_list %} {% if perms.assignment.can_manage_assignment or poll_dict.published %} - + + {% endwith %} {% endif %} {% endfor %} {% if assignment.profile.exists and perms.assignment.can_manage_assignment and assignment.status == "vot" %} diff --git a/openslides/assignment/templates/projector/Assignment.html b/openslides/assignment/templates/projector/Assignment.html index 8d4689cba..ef9aa7909 100644 --- a/openslides/assignment/templates/projector/Assignment.html +++ b/openslides/assignment/templates/projector/Assignment.html @@ -5,10 +5,12 @@ {% load staticfiles %} {% block title %}{{ block.super }} - {{ assignment }}{% endblock %} + {% block header %} {% endblock %} + {% block content %} {% if assignment.status != "fin" %}
- {% with vote=poll_dict.votes %} + {% with vote=poll_dict.votes %} + {% if 'Yes' in vote and 'No' in vote and 'Abstain' in vote %} {{ vote.Yes }}
{{ vote.No }}
@@ -173,8 +173,8 @@ {% else %}   {% endif %} - {% endwith %} -
- + {% for poll in assignment.poll_set.all %} @@ -58,8 +60,8 @@ {% endif %} {% endfor %} - - {% for candidate, votes in vote_results.items %} + + {% for candidate, poll_list in vote_results.items %} - {% 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 %} + + {% endwith %} + {% endif %} {% endfor %} {% endfor %} - + {% for poll in polls %} @@ -96,7 +101,7 @@ {% endif %} {% endfor %} - + {% for poll in polls %}
{% trans "Candidates" %}
{% if candidate in assignment.elected.all %} @@ -69,25 +71,28 @@ {% endif %} {{ candidate }} - {% if 'Yes' in vote and 'No' in vote and 'Abstain' in vote %} - {{ vote.Yes }}
- {{ vote.No }}
- {{ vote.Abstain }}
- {% elif 'Votes' in vote %} - {{ vote.Votes }} - {% elif vote == None %} - {% trans 'was not a
candidate'%} - {% else %} -   - {% endif %} -
+ {% if 'Yes' in vote and 'No' in vote and 'Abstain' in vote %} + {{ vote.Yes }}
+ {{ vote.No }}
+ {{ vote.Abstain }}
+ {% elif 'Votes' in vote %} + {{ vote.Votes }} + {% elif vote == None %} + {% trans 'was not a
candidate'%} + {% else %} +   + {% endif %} +
{%trans 'Invalid votes' %}
{%trans 'Votes cast' %}