Skip to content

Commit

Permalink
Show when a candidate is elected unopposed
Browse files Browse the repository at this point in the history
  • Loading branch information
symroe committed Apr 4, 2023
1 parent 07bb2fd commit 332f5ae
Showing 1 changed file with 16 additions and 7 deletions.
23 changes: 16 additions & 7 deletions postcode_lookup/templates/includes/ballot_model.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,22 @@
{% endif %}


{% if ballot.candidates_verified and not ballot.cancelled %}
{% if ballot.candidates_verified %}
{% if not ballot.cancelled or ballot.metadata.cancelled_election.title == "Uncontested election" %}
<ul class=&quot;u-list-reset ballot&quot;>
{% for candidate in ballot.candidates %}
<li class=&quot;ballot__candidate&quot;>
{{ candidate.person.name }}
{% if ballot.metadata.cancelled_election.title == "Uncontested election" %}
(elected unopposed)
{% endif %}
<br>
{{ candidate.party.party_name }}
</li>
{% endfor %}
</ul>
<p>Visit <a href=&quot;https://whocanivotefor.co.uk/elections/NE62EJ&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; class=&quot;o-external-link&quot;>Who Can I Vote For <span class=&quot;visually-hidden&quot;>(Opens in new window)</span></a> to find out more about your candidates</p>
{% endif %}


<ul class=&quot;u-list-reset ballot&quot;>
{% for candidate in ballot.candidates %}
<li class=&quot;ballot__candidate&quot;>{{ candidate.person.name }}<br>{{ candidate.party.party_name }}</li>
{% endfor %}
</ul>
<p>Visit <a href=&quot;https://whocanivotefor.co.uk/elections/NE62EJ&quot; target=&quot;_blank&quot; rel=&quot;noopener&quot; class=&quot;o-external-link&quot;>Who Can I Vote For <span class=&quot;visually-hidden&quot;>(Opens in new window)</span></a> to find out more about your candidates</p>
{% endif %}

0 comments on commit 332f5ae

Please sign in to comment.