]> asedeno.scripts.mit.edu Git - bluechips.git/blob - bluechips/templates/mobile/status/index.mako
8f7ca0d07a5ec0d029ac859cadd9af57fe510a11
[bluechips.git] / bluechips / templates / mobile / status / index.mako
1 <%inherit file="/mobile/base.mako"/>
2
3 ${self.tabs('status')}
4
5 <div id="tab-status" class="tab">
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 ${self.spendForm()}
40 ${self.transferForm()}