/
bio_blurb.html
56 lines (49 loc) · 2.21 KB
/
bio_blurb.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
{% load humanize %}
{% load i18n %}
{% load customtags %}
<p>
{% blocktrans with name=legislator.display_name chamber=legislator.chamber_name|title district=legislator.district state=legislator.metadata.name chamber_name=legislator.chamber_name|title com_count=legislator.committees.count|apnumber count counter=legislator.committees.count %}
{{name}} represents {{chamber}} District {{district}} in the {{state}} {{chamber_name}}, is a member of {{com_count}} committee,
{% plural %}
{{name}} represents {{chamber}} District {{district}} in the {{state}} {{chamber_name}}, is a member of <em>{{com_count}} committees</em>,
{% endblocktrans %}
{% with count=legislator.sponsored_bills_counts.primary %}
{% trans "and" %}
{% if count %}
{% trans "is the primary sponsor of" %}<em> {{count|apnumber}}</em>
{% with count=legislator.sponsored_bills_counts.secondary %}
{% if count %}
{% trans "bills,"%} {% trans "and is the secondary sponsor of"%} <em>{{count|apnumber}}</em> {% trans "bills" %}
{% else %}
{% trans "bills" %}.
{% endif %}
{% endwith %}
{% else %}
{% with count=legislator.sponsored_bills_counts.secondary %}
{% if count %}
{% trans "is a secondary sponsor of" %} {{count|apnumber}} {% trans "bills" %}.
{% else %}
{% trans "has not sponsored any bills in the current session." %}
{% endif %}
{% endwith %}
{% endif %}
{% endwith %}
</p>
{% if "_yearly_contributions" in legislator %}
<div id="ie-chart-container">
<table>
<tbody>
<!-- FIXME: these numbers should come from db -->
{% for year, amount in legislator|underscore_field:"yearly_contributions" %}
<tr> <td>{{year}}</td> <td>{{amount}}</td> </tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
{% if legislator.transparencydata_id %}
<p>
{% trans "For detailed campaign finance information visit " %}
<a href="http://influenceexplorer.com/politician/id/{{legislator.transparencydata_id}}?cycle=-1">Influence Explorer</a>. Figures via the <a href="http://followthemoney.org">National Institute on Money in State Politics</a>.
</p>
{% endif %}