diff --git a/openslides/assignment/models.py b/openslides/assignment/models.py index 36759b0a9..03f3ef99f 100644 --- a/openslides/assignment/models.py +++ b/openslides/assignment/models.py @@ -157,7 +157,7 @@ class Assignment(models.Model, SlideMixin): data['assignment'] = self data['title'] = self.name data['polls'] = self.poll_set.all() - data['votes'] = self.vote_results + data['vote_results'] = self.vote_results data['template'] = 'projector/Assignment.html' return data diff --git a/openslides/assignment/templates/assignment/view.html b/openslides/assignment/templates/assignment/view.html index 74ca2ca2b..1647a9c69 100644 --- a/openslides/assignment/templates/assignment/view.html +++ b/openslides/assignment/templates/assignment/view.html @@ -99,6 +99,7 @@ {% if polls %}
{% with ballotnumber=polls.count %} @@ -107,24 +108,25 @@ {% endwith %} | |||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{% trans "Candidates" %} | {% for poll in polls %} - {# if poll.published and not perms.assignment.can_manage_assignment or perms.assignment.can_manage_assignment #} + {% if poll.published or perms.assignment.can_manage_assignment %}
{{ forloop.counter }}. {% trans 'ballot' %}
{% if perms.assignment.can_manage_assignment %}
- - - - - - + + + + + + {% endif %} |
- {# endif #}
+ {% endif %}
{% endfor %}
{% if assignment.profile.exists and perms.assignment.can_manage_assignment and assignment.status == "vot" %}
@@ -136,46 +138,51 @@ | {% endif %}|||||||||||||||||
- {% if candidate in assignment.elected.all %} - {% if perms.assignment.can_manage_assignment %} - - {% else %} - - {% endif %} + | |||||||||||||||||||
+ {% if candidate in assignment.elected.all %} + {% if perms.assignment.can_manage_assignment %} + {% else %} - {% if perms.assignment.can_manage_assignment %} - - {% endif %} + {% endif %} - {{ candidate }} - | - {% for vote in votes %} + {% else %} + {% if perms.assignment.can_manage_assignment %} + + {% endif %} + {% endif %} + {{ candidate }} + + {% for vote in votes %} + {% if perms.assignment.can_manage_assignment %} + {# Hier stimmt es noch nicht. Es muss rein, dass veröffentlichte Wahlergebnisse für jedermann sichtbar sind #}
- {% if vote %}
- {% if 'Yes' in vote and 'No' in vote and 'Abstain' in vote %}
- {% if vote.Yes %}{{ vote.Yes }}{% else %}∅{% endif %} - {% if vote.No %}{{ vote.No }}{% else %}∅{% endif %} - {% if vote.Abstain %}{{ vote.Abstain }}{% else %}∅{% endif %} - {% elif 'Votes' in vote %} - {% if vote.Votes %}{{ vote.Votes }}{% else %}∅{% endif %} - {% 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 %} |
- {% endfor %}
- {% if assignment.profile.exists and perms.assignment.can_manage_assignment and assignment.status == "vot" %}
- {% endif %} - | + {% endif %} + {% endfor %} + | ||||||||||||||||
{%trans 'Invalid votes' %} | {% for poll in polls %} - {% if poll.published and not perms.assignment.can_manage_assignment or perms.assignment.can_manage_assignment %} + {% if poll.published or perms.assignment.can_manage_assignment %}{{ poll.print_votesinvalid }} | {% endif %} {% endfor %} @@ -183,10 +190,11 @@{% endif %} | |||||||||||||||||
{%trans 'Votes cast' %} | +{%trans 'Votes cast' %} | {% for poll in polls %} - {% if poll.published and not perms.assignment.can_manage_assignment or perms.assignment.can_manage_assignment %} + {% if poll.published or perms.assignment.can_manage_assignment %}{{ poll.print_votescast }} | {% endif %} {% endfor %} diff --git a/openslides/assignment/templates/projector/Assignment.html b/openslides/assignment/templates/projector/Assignment.html index 3d9e021e1..8d4689cba 100644 --- a/openslides/assignment/templates/projector/Assignment.html +++ b/openslides/assignment/templates/projector/Assignment.html @@ -27,88 +27,88 @@ {% block scrollcontent %} {% if not assignment.profile.exists %} -
{% trans "Candidates" %} | - {% for poll in assignment.poll_set.all %} - {% if poll.published %} -||||||||||
---|---|---|---|---|---|---|---|---|---|---|
- {% if candidate.1 %}
-
-
-
+ {% trans "Election results" %}+
| ||||||||||
{%trans 'Invalid votes' %} | + {% for poll in polls %} + {% if poll.published %} +{{ poll.print_votesinvalid }} | + {% endif %} + {% endfor %} +|||||||||
{%trans 'Votes cast' %} | + {% for poll in polls %} + {% if poll.published %} +{{ poll.print_votescast }} | + {% endif %} + {% endfor %} +