Skip to content
Snippets Groups Projects
Commit c919f64c authored by Ben Adida's avatar Ben Adida
Browse files

added options to badge

parent c76f2aeb
No related branches found
No related tags found
No related merge requests found
<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>
......@@ -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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment