From c1e9540699c3a9f76f4ba365630d65f81f061c8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20J=C3=A4ckel?= Date: Thu, 5 Jul 2012 01:15:04 +0200 Subject: [PATCH] Fix #280 --- openslides/assignment/models.py | 1 + .../templates/projector/Assignment.html | 20 +++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/openslides/assignment/models.py b/openslides/assignment/models.py index ae024e537..d5d0752d3 100644 --- a/openslides/assignment/models.py +++ b/openslides/assignment/models.py @@ -161,6 +161,7 @@ class Assignment(models.Model, SlideMixin): data['title'] = self.name data['polls'] = self.poll_set.all() data['vote_results'] = self.vote_results + data['assignment_publish_winner_results_only'] = config['assignment_publish_winner_results_only'] data['template'] = 'projector/Assignment.html' return data diff --git a/openslides/assignment/templates/projector/Assignment.html b/openslides/assignment/templates/projector/Assignment.html index ef9aa7909..43520ce69 100644 --- a/openslides/assignment/templates/projector/Assignment.html +++ b/openslides/assignment/templates/projector/Assignment.html @@ -75,14 +75,18 @@ {% if poll_dict.published %} {% with vote=poll_dict.votes %} - {% 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'%} + {% if not assignment_publish_winner_results_only or candidate in assignment.elected.all %} + {% 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 %} {% else %}   {% endif %}