aaronsw / watchdog

The watchdog project.

This URL has Read+Write access

watchdog / templates / earmark_list.html
100644 46 lines (34 sloc) 1.483 kb
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
$def with (earmarks, limit)
 
$var width: 90%
$var color: white
 
$var title: Earmarks
 
<style>
.header { background-color: #fff; font-weight: bold; border-bottom: 1px solid #999; border-top: 1px solid #999; }
</style>
 
 
<h1>Earmarks
$if getattr(earmarks[0], 'sponsor_name', None): requested by $earmarks[0].sponsor_name
</h1>
<p class='subheading'>Data from Fiscal Year 2008 appropriations bills supplied by Taxpayers for Common Sense. </p>
 
<table class="structure" width="100%">
<tr><td class="header">Amount</td><td class="header" colspan="2">Earmark Description</td><td class="header" style="white-space: nowrap">Intended Recipient</td></tr>
$ trclass = "odd"
$for em in earmarks:
    $if trclass == "odd":
        $ trclass = "even"
    $else:
        $ trclass = "odd"
    <tr class="$trclass">
        <td style="padding: 3px; text-align: right;"><a href="/e/$em.id"><b>\$$commify(em.final_amt)</b></a></td>
        <td style="color: #999; padding-left: 6px; padding-right: 8px;">for</td>
        <td> $em.description </td>
        <td>$em.intended_recipient</td>
    </tr>
 
</table>
 
$ page = int(query_param("page", 0))
 
$if page != 0:
    &lt;&lt;<a href="$changequery(page=page - 1)">Prev</a>
 
$if len(earmarks) == limit:
     | <a href="$changequery(page=page + 1)">Next</a> &gt;&gt;
 
<!--
<p><strong>Developers:</strong> Get this page in <a href="index.n3?page=$page">N3</a>, <a href="index.xml?page=$page">XML</a>, or <a href="index.json?page=$page">JSON</a>.</p>
-->