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 %}