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