Skip to content
This repository has been archived by the owner on Dec 23, 2017. It is now read-only.

Commit

Permalink
Merge pull request #248 from jmcarp/feature/add-state-and-district-links
Browse files Browse the repository at this point in the history
Add state and district links to candidate detail page.
  • Loading branch information
LindsayYoung committed Jun 9, 2015
2 parents 40842bf + 606abe2 commit a9fff00
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion templates/candidates-single.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,13 @@ <h5 class="entity__term__label"><a class="term" data-term="Status">Status</a></h
</li>
<li class="entity__term">
<h5 class="entity__term__label">District</h5>
<span class="entity__term__data">{{ state }} {% if district %}- {{district}} {% endif %}</span>
<span class="entity__term__data">
{% if district %}
<a href="{{ url_for('candidates', state=state, district=district, cycle=max(cycles)) }}">{{ state }} - {{ district }}</a>
{% else %}
<a href="{{ url_for('candidates', state=state, cycle=max(cycles)) }}">{{ state }}</a>
{% endif %}
</span>
</li>
<li class="entity__term">
<h5 class="entity__term__label">
Expand Down

0 comments on commit a9fff00

Please sign in to comment.