aaronsw / watchdog

The watchdog project.

This URL has Read+Write access

watchdog / templates / employer.html
100644 41 lines (34 sloc) 1.539 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
$def with (contributions, corp_id, total_num)
 
$var width: 90%
$var color: white
 
$var title: $corp_id.title()
 
<script type="text/javascript" src="/static/js/fec.js"></script>
 
<h1>Contributions from employees of $corp_id.title()</h1>
<p class='subheading'>Political contributions disclosed by campaign committees to the Federal Election Commission, sorted by employer. The data, from the FEC, covers the years 1979 through 2008.</p>
 
  <style>
  .subtitle { color: #777;}
  table.donors th, table.donors td { font-weight: normal; padding: 0.3em 1em;}
  table.donors td { text-align: right;}
  </style>
 
<table class="charted structure donors" style="width: 100%; margin-top: 0em; margin-bottom: 2em;">
$ trclass = "odd"
$for c in contributions:
    <tr class="$trclass">
        <th class="paying">
            <strong>\$$commify(int(round(c.how_much)))</strong> from
            <strong>$c.how_many</strong> $corp_id.title()
            $if c.how_many == 1: employee
            $else: employees
            (<strong>$round(float(c.how_many*100)/total_num, 1)%</strong>)
            to <a href="/p/$c.polid">$c.firstname $c.lastname</a>
        </td>
        <td style="text-align: right;"><!--
<a id="view_details1" href="#" onclick="return view_details(1);">view details</a>
<a id="hide_details1" style="display: none;" href="#" onclick="return hide_details(1);">hide details</a>-->
        </td>
    </tr>
    $if trclass == "odd":
        $ trclass = "even"
    $else:
        $ trclass = "odd"
</table>