Skip to content

Commit

Permalink
use full legislator objects for sponsor list
Browse files Browse the repository at this point in the history
  • Loading branch information
twneale committed Jun 26, 2012
1 parent adbf360 commit 7def5ab
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions site/templates/billy/web/public/bill.html
Expand Up @@ -58,17 +58,15 @@ <h2 class="withTimeline withTip">{{ metadata.name }} {{bill.type_string|title}}

{% for sponsor in sponsors %}
{% if sponsor.leg_id %}
<li><a href="{% url 'legislator' abbr sponsor.leg_id '' %}">{{ sponsor.name }}</a>
{% with legislator=sponsor.legislator %}
{% if legislator.active %}
({{ legislator.party }}) {{ legislator.district }}
{% endif %}
{% endwith %}
<li><a href="{{ sponsor.get_absolute_url }}">{{ sponsor.display_name }}</a>
{% if sponsor.active %}
({{ sponsor.party }}) {{ sponsor.district }}
{% endif %}
{% else %}
{% if sponsor.committee_id %}
<li><a href="{% url 'committee' abbr sponsor.committee_id %}">{{ sponsor.name }}</a>
{% else %}
{# Sponsor had no leg_id or was inactive. Might be a committee. #}
{# Sponsor had no leg_id or was inactive. #}
<li>{{ sponsor.name }}
{% endif %}
{% endif %} <span class="tip sideNote">{{ sponsor.type }}</span></li>
Expand Down

0 comments on commit 7def5ab

Please sign in to comment.