From fae09b4996c08a1f0182a3a6d30973d5ca0362a7 Mon Sep 17 00:00:00 2001 From: Ben Adida <ben@adida.net> Date: Fri, 25 Feb 2011 17:14:00 -0800 Subject: [PATCH] simplified language for single-trustee elections --- helios/models.py | 4 ++++ helios/templates/election_view.html | 12 +++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/helios/models.py b/helios/models.py index 9fb068b..af420d7 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 abf42ed..cfc67e3 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 %} -- GitLab