$def with (filings, limit)
$var width: 90%
$var color: white
$var title: Lobbyist Filings
<style>
.header { background-color: #fff; font-weight: bold; border-bottom: 1px solid #999; border-top: 1px solid #999; }
</style>
<h1>Lobbyist Filings</h1>
$def lobLink(f):
$if f.lobbyist.contact_name:
<a href="/lob/pe/$f.lobbyist_id">$f.lobbyist.contact_name.title()</a>
$else:
<a href="/lob/pe/$f.lobbyist_id">$f.lobbyist.prefix $f.lobbyist.firstname.title() $f.lobbyist.lastname.title() $f.lobbyist.suffix</a>
<table class="structure" width=100%>
<tr>
<td class="header">ID</td>
<td class="header">Amendment</td>
<td class="header">Year</td>
<td class="header" style="white-space: nowrap">Signed Date</td>
<td class="header">Lobbyist ID</td>
<td class="header">Org ID</td>
<td class="header">Certified</td>
<td class="header">PACs</td>
<td class="header">Contributions</td>
</tr>
$for i,f in enumerate(filings):
<tr class="${'odd' if i%2 else 'even'}">
<td><a href="$f.house_url">$f.id</a></td>
<td>$f.amendment</td>
<td>$f.year</td>
<td>$f.signed_date</td>
<td>
$if f.lobbyist:
$:lobLink(f)
</td>
<td>
$if f.org:
<a href="/lob/o/$f.org_id">$f.org.name.title()</a>
</td>
<td>$f.certified</td>
<td>
$if f.pacs:
<a href="/lob/pa/?filing_id=$f.id">PACs</a>
$# $for p in f.pacs:
$# <a href="/lob/pa/$p.pac.id">$p.pac.name</a><br>
</td>
<td>
$if f.contributions:
<a href="/lob/c/$f.id">Contributions</a>
$# $for c in f.contributions:
$# \$$commify(c.amount)<br>
</td>
</tr>
</table>
<br />
<b>Identification Numbers:</b> House ID $f.house_id, Senate ID $f.senate_id, Filer Type $f.filer_type, Type $f.type.
<br />
$if f.comments:
<b>Comments:</b> $f.comments
$ page = int(query_param("page", 0))
<br /><br />
$if page != 0:
<span style="color: #EE4400">← <a href="$changequery(page=page - 1)" class="more">Prev</a></span>
<span style="color: #EE4400"><a href="/lob/f/" class="more">Browse Filings Index</a></span>
$if len(filings) == limit:
<span style="color: #EE4400"><a href="$changequery(page=page + 1)" class="more">Next</a> →</span>