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

Add state and district links to candidate detail page. #248

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion templates/candidates-single.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,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