]> asedeno.scripts.mit.edu Git - bluechips.git/blob - bluechips/templates/status/index.mako
f83bea1e29f03fbfa7c360c0c742fd673b2bf920
[bluechips.git] / bluechips / templates / status / index.mako
1 <%inherit file="/base.mako"/>
2
3 <div class="block">
4   <h2>Settling Transfers</h2>
5
6   % if len(c.settle) == 0:
7     <p>No need! The books are balanced!</p>
8   % else:
9     <div class='pie'>${h.image(h.url_for(controller='graph', action='pie'), 'I like pie.')}</div>
10     <p>To balance the books, the following transfers need to be made:</p>
11
12     <table id="balance">
13       <tr>
14         <th>From</th>
15         <th>To</th>
16         <th>Amount</th>
17       </tr>
18       % for transfer in c.settle:
19         <tr>
20           <td>${transfer[0].name}</td>
21           <td>${transfer[1].name}</td>
22           <td class="amount">${transfer[2]}</td>
23         </tr>
24       % endfor
25       % if c.net != 0:
26         <tr>
27           <th colspan="2">
28             % if c.net > 0:
29               The group owes you:
30             % elif c.net < 0:
31               You owe the group:
32             % endif
33           </th>
34           <th class="amount">${abs(c.net)}</th>
35         </tr>
36       % endif
37     </table>
38   % endif
39 </div>
40
41 <div class="block">
42   <h2>Totals</h2>
43
44   <table id="totals">
45     <tr>
46       <td class="scope"></td>
47       <th class="scope">Everyone</th>
48       <th class="scope">My Share</th>
49     </tr>
50     % for period in ('Total', 'Past year', 'Year to date', 'Month to date', 'Last month'):
51       <tr>
52         <th>${period}</th>
53         % for scope in ('all', 'mine'):
54           <td>${c.totals[period][scope]}</td>
55         % endfor
56       </tr>
57     % endfor
58   </table>
59 </div>
60
61 <div class="block">
62   <h2>
63     Your History
64     <span class="see-all">
65       ${h.link_to('See all history', h.url_for(controller='history', action='index'))}
66     </span>
67   </h2>
68
69   <h3>Expenditures</h3>
70
71   ${self.listExpenditures(c.expenditures)}
72
73   <h3>Transfers</h3>
74
75   ${self.listTransfers(c.transfers)}
76 </div>