X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=bluechips%2Ftemplates%2Fmobile%2Fstatus%2Findex.mako;h=55dc7929cdec29a3c807d7d8ca00348c2240191a;hb=82ad8466cea54eb777e71bb1a74798461461598b;hp=08069e1b67bf341297fbfcbe8deb3ee3f86dbdb1;hpb=0b9f273d12cbbe8790c4a9dec14d282a461e54be;p=bluechips.git diff --git a/bluechips/templates/mobile/status/index.mako b/bluechips/templates/mobile/status/index.mako index 08069e1..55dc792 100644 --- a/bluechips/templates/mobile/status/index.mako +++ b/bluechips/templates/mobile/status/index.mako @@ -1,29 +1,8 @@ <%inherit file="/mobile/base.mako"/> -<%! - from datetime import date -%> - -
- - - Dashboard - - - - Expense - - - - Transfer - -
+${self.tabs('status')}
- % for message in h.flash.pop_messages(): -
${message | n}
- % endfor - % if len(c.settle) == 0:

No need! The books are balanced!

% else: @@ -39,92 +18,23 @@ ${transfer[0].name} ${transfer[1].name} - ${transfer[2]} + ${transfer[2]} % endfor - - % endif -
- -
-
- ${h.auth_token_hidden_field()} - - - - - - - - - - - - - - - - - -
${h.select('spender_id', [request.environ['user'].id], c.users)}
${h.currency('amount', 0, size=8)}
${h.text('date', date.today().strftime('%m/%d/%Y'), size=16)}
${h.text('description')}
- -

Change how an expenditure is split up.

- - - % for ii, user_row in enumerate(c.users): - <% - user_id, user = user_row - if user.resident: - percent = 1 - else: - percent = 0 - %> + % if c.net != 0: - - + + - % endfor - - - -
- ${h.text('shares-%d.amount' % ii, percent)} - ${h.hidden('shares-%d.user_id' % ii, user.id)} - + % if c.net > 0: + The group owes you: + % elif c.net < 0: + You owe the group: + % endif + ${abs(c.net)}
- ${h.submit(None, 'Submit', class_="submitbutton")} -
-
-
- -
-
- ${h.auth_token_hidden_field()} - - - - - - - - - - - - - - - - - - - - - - - - + % endif
${h.select('debtor_id', request.environ['user'].id, c.users)}
${h.select('creditor_id', None, c.users)}
${h.currency('amount', 0, size=8)}
${h.text('date', date.today().strftime('%m/%d/%Y'), size=16)}
${h.text('description')}
- -
-
+ % endif
+${self.spendForm()} +${self.transferForm()}