Enhancement to ticket # 389 (Message on assignment slide when no vote results yet available)

This commit is contained in:
Norman Jäckel 2012-10-29 10:16:12 +01:00
parent 015dc159ed
commit b213e75223
2 changed files with 4 additions and 3 deletions

View File

@ -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']

View File

@ -122,7 +122,7 @@
</tr>
</table>
{% elif polls_available %}
{% elif some_polls_available %}
<i>{% trans "Vote results are not published yet." %}</i>
{% elif assignment.candidates %}
<i>{% trans "No ballots available." %}</i>