From 79b77b129c8ae53ae058aabc9fefa3ccc141a8dd Mon Sep 17 00:00:00 2001
From: Ben Adida <ben@adida.net>
Date: Sun, 10 Nov 2013 15:51:40 -0800
Subject: [PATCH] small layout tweak and reversed order of permission and
 JSONification annotations which were giving weird errors when bad permission

---
 helios/templates/election_view.html   | 2 +-
 helios/views.py                       | 6 +++---
 server_ui/media/foundation-tweaks.css | 4 ++++
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/helios/templates/election_view.html b/helios/templates/election_view.html
index 7591498..288029f 100644
--- a/helios/templates/election_view.html
+++ b/helios/templates/election_view.html
@@ -6,7 +6,7 @@
   <h3 class="title">{{ election.name }}
 {% if admin_p %}
 {% if not election.frozen_at %}
-<a class="small button" href="{% url helios.views.one_election_edit election.uuid %}">edit</a>
+<small><a class="small button" href="{% url helios.views.one_election_edit election.uuid %}">edit</a></small>
 {% endif %}
 {% endif %}</h3>
 <p style="padding-top:0px; margin-top:0px">
diff --git a/helios/views.py b/helios/views.py
index aaa752a..8d9d453 100644
--- a/helios/views.py
+++ b/helios/views.py
@@ -367,8 +367,8 @@ def socialbuttons(request):
 ##
 ## As of July 2009, there are always trustees for a Helios election: one trustee is acceptable, for simple elections.
 ##
-@json
 @election_view()
+@json
 def list_trustees(request, election):
   trustees = Trustee.get_by_election(election)
   return [t.toJSONDict(complete=True) for t in trustees]
@@ -486,8 +486,8 @@ def trustee_upload_pk(request, election, trustee):
 ## Ballot Management
 ##
 
-@json
 @election_view()
+@json
 def get_randomness(request, election):
   """
   get some randomness to sprinkle into the sjcl entropy pool
@@ -498,8 +498,8 @@ def get_randomness(request, election):
     #"randomness" : base64.b64encode(uuid.uuid4().bytes + uuid.uuid4().bytes)
     }
 
-@json
 @election_view(frozen=True)
+@json
 def encrypt_ballot(request, election):
   """
   perform the ballot encryption given answers_json, a JSON'ified list of list of answers
diff --git a/server_ui/media/foundation-tweaks.css b/server_ui/media/foundation-tweaks.css
index d412c5d..25aea73 100644
--- a/server_ui/media/foundation-tweaks.css
+++ b/server_ui/media/foundation-tweaks.css
@@ -58,4 +58,8 @@ margin: 0 auto -4.5em;
 }
 .footer, .push {
 height: 4.5em;
+}
+
+select {
+    width: auto;
 }
\ No newline at end of file
-- 
GitLab