Enhancement to ticket # 389 (Message on assignment slide when no vote results yet available)
This commit is contained in:
parent
015dc159ed
commit
b213e75223
@ -227,11 +227,12 @@ class Assignment(models.Model, SlideMixin):
|
|||||||
"""
|
"""
|
||||||
return the slide dict
|
return the slide dict
|
||||||
"""
|
"""
|
||||||
|
polls = self.poll_set
|
||||||
data = super(Assignment, self).slide()
|
data = super(Assignment, self).slide()
|
||||||
data['assignment'] = self
|
data['assignment'] = self
|
||||||
data['title'] = self.name
|
data['title'] = self.name
|
||||||
data['polls_available'] = self.poll_set.exists()
|
data['some_polls_available'] = polls.exists()
|
||||||
data['polls'] = self.poll_set.filter(published=True)
|
data['polls'] = polls.filter(published=True)
|
||||||
data['vote_results'] = self.vote_results(only_published=True)
|
data['vote_results'] = self.vote_results(only_published=True)
|
||||||
data['assignment_publish_winner_results_only'] = \
|
data['assignment_publish_winner_results_only'] = \
|
||||||
config['assignment_publish_winner_results_only']
|
config['assignment_publish_winner_results_only']
|
||||||
|
@ -122,7 +122,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
{% elif polls_available %}
|
{% elif some_polls_available %}
|
||||||
<i>{% trans "Vote results are not published yet." %}</i>
|
<i>{% trans "Vote results are not published yet." %}</i>
|
||||||
{% elif assignment.candidates %}
|
{% elif assignment.candidates %}
|
||||||
<i>{% trans "No ballots available." %}</i>
|
<i>{% trans "No ballots available." %}</i>
|
||||||
|
Loading…
Reference in New Issue
Block a user