diff --git a/helios/templates/election_badge.html b/helios/templates/election_badge.html index dcdc4c2174fefe85911fb6f3eb5c0bf2c1fa84e5..3af1b6a88ba426f03cebe22a52d4ac7500361690 100644 --- a/helios/templates/election_badge.html +++ b/helios/templates/election_badge.html @@ -1,3 +1,3 @@ -<h3 style="padding:0; margin:0">{{election.name}}</h3> -<b>{{election.num_cast_votes}}</b> cast votes. [<a href="{{election_url}}">vote!</a>]<br /> -<span style="font-size:0.7em;">powered by <a href="http://heliosvoting.org">Helios Voting</a></span> +{% if show_title %}<h3 style="padding:0; margin:0">{{election.name}}</h3>{% endif %} +<b>{{election.num_cast_votes}}</b> cast votes.{% if show_vote_link %} [<a target="_top" href="{{election_url}}">vote!</a>]{% endif %}<br /> +<span style="font-size:0.7em;">powered by <a target="_top" href="http://heliosvoting.org">Helios Voting</a></span> diff --git a/helios/views.py b/helios/views.py index e486fa32ee4d2150ca6e9146bac6f787670dc0fb..3a1819d1b0e29a648125e6b1e48d1f50bf9f1ab4 100644 --- a/helios/views.py +++ b/helios/views.py @@ -195,7 +195,10 @@ def one_election(request, election): @election_view() def election_badge(request, election): election_url = get_election_url(election) - return render_template(request, "election_badge", {'election': election, 'election_url': election_url}) + params = {'election': election, 'election_url': election_url} + for option_name in ['show_title', 'show_vote_link']: + params[option_name] = (request.GET.get(option_name, '1') == '1') + return render_template(request, "election_badge", params) @election_view() def one_election_view(request, election):