]> asedeno.scripts.mit.edu Git - bluechips.git/blob - bluechips/templates/status/index.mako
added more 'my share' scope to status dashboard
[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].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       <td class="scope"></td>
34       <th class="scope">Everyone</th>
35       <th class="scope">My Share</th>
36     </tr>
37     % for period in ('Total', 'Past year', 'Year to date', 'Month to date', 'Last month'):
38       <tr>
39         <th>${period}</th>
40         % for scope in ('all', 'mine'):
41           <td>${c.totals[period][scope]}</td>
42         % endfor
43       </tr>
44     % endfor
45   </table>
46 </div>
47
48 <div class="block">
49   <h2>Add a new transaction</h2>
50
51   <ul>
52     <li>${h.link_to('Expenditure for the group', h.url_for(controller='spend', action='index'))}</li>
53     <li>${h.link_to('Transfer between two people', h.url_for(controller='transfer', action='index'))}</li>
54   </ul>
55 </div>
56
57 <div class="block">
58   <h2>Your History</h2>
59
60   ${h.link_to('See all history', h.url_for(controller='history', action='index'))}
61
62   <h3>Expenditures</h3>
63
64   ${self.listExpenditures(c.expenditures)}
65
66   <h3>Transfers</h3>
67
68   ${self.listTransfers(c.transfers)}
69 </div>