Minor changes

This commit is contained in:
RunasSudo 2017-11-25 03:18:45 +11:00
parent 82aa31cf50
commit 11e6c4a7aa
Signed by: RunasSudo
GPG Key ID: 7234E476BF21C61A
3 changed files with 12 additions and 2 deletions

View File

@ -51,7 +51,7 @@ class ElectionTestCase(EosTestCase):
election.name = 'Test Election'
for i in range(3):
voter = Voter()
voter = Voter(name=['Alice', 'Bob', 'Charlie'][i])
election.voters.append(voter)
# Check _instance
self.assertEqual(voter._instance, (election.voters, i))

View File

@ -233,7 +233,7 @@ class ElectionTestCase(EosTestCase):
election.name = 'Test Election'
for i in range(3):
voter = Voter()
voter = Voter(name=['Alice', 'Bob', 'Charlie'][i])
election.voters.append(voter)
for i in range(3):

View File

@ -65,4 +65,14 @@
{% include eosweb.core.main.model_view_map[question.__class__]['result_raw'] %}
{% endfor %}
{% endif %}
{% if election.workflow.get_task('eos.base.workflow.TaskOpenVoting').status < Status.EXITED %}
<h2>Voting booth</h2>
<p>Voting in this election has not yet begun. If you would like to preview the voting booth, <a href="{{ url_for('election_booth', election_id=election._id) }}">click here</a>. Note that you will not be able to cast any ballots until voting opens.</p>
{% elif election.workflow.get_task('eos.base.workflow.TaskCloseVoting').status == Status.EXITED %}
<h2>Voting booth</h2>
<p>Voting in this election has concluded. If you would like to review the voting booth, <a href="{{ url_for('election_booth', election_id=election._id) }}">click here</a>. Note that you will no longer be able to cast any ballots.</p>
{% endif %}
{% endblock %}