]> asedeno.scripts.mit.edu Git - bluechips.git/blob - bluechips/templates/status/index.mako
5e9539dabf3f79565940f06f92a75e2e6d69cab4
[bluechips.git] / bluechips / templates / status / index.mako
1 <%inherit file="/base.mako"/>
2
3 <h2>Settling Transfers</h2>
4
5 % if len(c.settle) == 0:
6 <p>No need! The books are balanced!</p>
7 % else:
8 <p>To balance the books, the following transfers need to be made:</p>
9
10 <table>
11     <tr>
12         <th>From</th>
13         <th>To</th>
14         <th>Amount</th>
15     </tr>
16     % for transfer in c.settle:
17     <tr>
18         <td>${transfer[0].username}</td>
19         <td>${transfer[1].username}</td>
20         <td>${transfer[2]}</td>
21     </tr>
22     % endfor
23 </table>
24 % endif
25
26 <h2>Totals</h2>
27
28 <table>
29     <tr>
30         <td>Total</td>
31         <td>${c.total}</td>
32     </tr>
33     <tr>
34         <td>Past year</td>
35         <td>${c.year_total}</td>
36     </tr>
37     <tr>
38         <td>Year to date</td>
39         <td>${c.this_year_total}</td>
40     </tr>
41     <tr>
42         <td>Month to date</td>
43         <td>${c.this_month_total}</td>
44     </tr>
45     <tr>
46         <td>Last month</td>
47         <td>${c.last_month_total}</td>
48     </tr>
49 </table>
50
51 <h2>Add a new transaction</h2>
52
53 <ul>
54     <li>${h.link_to('Expenditure for the group', h.url_for(controller='spend', action='index'))}</li>
55     <li>${h.link_to('Transfer between two people', h.url_for(controller='transfer', action='index'))}</li>
56 </ul>
57
58 <h2>Your History</h2>
59
60 ${h.link_to('See all history', h.url_for(controller='history',
61                                          action='index'))}
62
63 <h3>Expenditures</h3>
64
65 ${self.listExpenditures(c.expenditures)}
66
67 <h3>Transfers</h3>
68
69 ${self.listTransfers(c.transfers)}