aaronsw / watchdog

The watchdog project.

This URL has Read+Write access

watchdog / templates / occupation.html
100644 46 lines (33 sloc) 1.082 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 (candidates, committees, occupation)
 
$var width: 90%
$var color: white
 
$var title: $occupation
 
<h1>$occupation.title()</h1>
 
<h2>Top candidates</h2>
  
<table class="structure" width="500">
$ trclass = "odd"
 
$for c in candidates:
    $if trclass == "odd":
        $ trclass = "even"
    $else:
        $ trclass = "odd"
    <tr class="$trclass">
        <td>$loop.index. <a href="/p/$c.polid">$c.firstname $c.lastname</a>$(c.party and ', '+c.party or '')</td>
        <td style="text-align: right;">\$$commify(int(c.amt))</td>
    </tr>
   
</table>
 
<p><a href="/occupation/$occupation/candidates" class="footer">More...</a></p>
 
<h2>Top committees</h2>
  
<table class="structure" width="500">
$ trclass = "odd"
 
$for c in committees:
    $if trclass == "odd":
        $ trclass = "even"
    $else:
        $ trclass = "odd"
    <tr class="$trclass">
        <td>$loop.index. $c.name.title()</td>
        <td style="text-align: right;">\$$commify(int(c.amt))</td>
    </tr>
   
</table>
 
<p><a href="/occupation/$occupation/committees" class="footer">More...</a></p>