]> asedeno.scripts.mit.edu Git - bluechips.git/blob - bluechips/templates/status/index.mako
big interface overhaul, doesn't really add any new features yet
[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>
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].username}</td>
20           <td>${transfer[1].username}</td>
21           <td>${transfer[2]}</td>
22         </tr>
23       % endfor
24     </table>
25   % endif
26 </div>
27
28 <div class="block">
29   <h2>Totals</h2>
30
31   <table id="totals">
32     <tr>
33       <th>Total</th>
34       <td>${c.total}</td>
35     </tr>
36     <tr>
37       <th>Past year</th>
38       <td>${c.year_total}</td>
39     </tr>
40     <tr>
41       <th>Year to date</th>
42       <td>${c.this_year_total}</td>
43     </tr>
44     <tr>
45       <th>Month to date</th>
46       <td>${c.this_month_total}</td>
47     </tr>
48     <tr>
49       <th>Last month</th>
50       <td>${c.last_month_total}</td>
51     </tr>
52   </table>
53 </div>
54
55 <div class="block">
56   <h2>Add a new transaction</h2>
57
58   <ul>
59     <li>${h.link_to('Expenditure for the group', h.url_for(controller='spend', action='index'))}</li>
60     <li>${h.link_to('Transfer between two people', h.url_for(controller='transfer', action='index'))}</li>
61   </ul>
62 </div>
63
64 <div class="block">
65   <h2>Your History</h2>
66
67   ${h.link_to('See all history', h.url_for(controller='history', action='index'))}
68
69   <h3>Expenditures</h3>
70
71   ${self.listExpenditures(c.expenditures)}
72
73   <h3>Transfers</h3>
74
75   ${self.listTransfers(c.transfers)}
76 </div>