From b213e75223385a4a1037c65eeddeec6a25566099 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Norman=20J=C3=A4ckel?= Date: Mon, 29 Oct 2012 10:16:12 +0100 Subject: [PATCH] Enhancement to ticket # 389 (Message on assignment slide when no vote results yet available) --- openslides/assignment/models.py | 5 +++-- openslides/assignment/templates/projector/Assignment.html | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/openslides/assignment/models.py b/openslides/assignment/models.py index 9d2cf8814..4b86b75cf 100644 --- a/openslides/assignment/models.py +++ b/openslides/assignment/models.py @@ -227,11 +227,12 @@ class Assignment(models.Model, SlideMixin): """ return the slide dict """ + polls = self.poll_set data = super(Assignment, self).slide() data['assignment'] = self data['title'] = self.name - data['polls_available'] = self.poll_set.exists() - data['polls'] = self.poll_set.filter(published=True) + data['some_polls_available'] = polls.exists() + data['polls'] = polls.filter(published=True) data['vote_results'] = self.vote_results(only_published=True) data['assignment_publish_winner_results_only'] = \ config['assignment_publish_winner_results_only'] diff --git a/openslides/assignment/templates/projector/Assignment.html b/openslides/assignment/templates/projector/Assignment.html index 181597a9f..8cf59860c 100644 --- a/openslides/assignment/templates/projector/Assignment.html +++ b/openslides/assignment/templates/projector/Assignment.html @@ -122,7 +122,7 @@ - {% elif polls_available %} + {% elif some_polls_available %} {% trans "Vote results are not published yet." %} {% elif assignment.candidates %} {% trans "No ballots available." %}