diff --git a/helios/models.py b/helios/models.py index 9fb068b55e125f812be7dbe7efa580d91f2479b6..af420d711ec2ed8f5a4468b29ff05fef4735a4c9 100644 --- a/helios/models.py +++ b/helios/models.py @@ -141,6 +141,10 @@ class Election(HeliosModel): def num_voters(self): return self.voter_set.count() + @property + def num_trustees(self): + return self.trustee_set.count() + @property def last_alias_num(self): """ diff --git a/helios/templates/election_view.html b/helios/templates/election_view.html index abf42edb30904a18084424e72970eefcc479b573..cfc67e30178ff39b189dc8be4e293fcb57c4639a 100644 --- a/helios/templates/election_view.html +++ b/helios/templates/election_view.html @@ -109,10 +109,20 @@ trustees will be asked to provide their share of the decryption. {% else %} {% if election.ready_for_decryption_combination %} -<a href="{% url helios.views.combine_decryptions election.uuid %}">combine trustee decryptions and release results</a><br /> +<a href="{% url helios.views.combine_decryptions election.uuid %}"> +{% if election.num_trustees == 1 %} +release results +{% else %} +combine trustee decryptions and release results +{% endif %} +</a><br /> +{% if election.num_trustees == 1 %} +The result is released and all voters are notified. +{% else %} The decryption shares from the trustees are combined and the tally is decrypted.<br /> Once you do this, the tally will be immediately available for all to see, and all voters will be notified that the tally is ready. +{% endif %} {% else %} <a href="{% url helios.views.list_trustees_view election.uuid %}">trustees (for decryption)</a> {% endif %}