X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;ds=sidebyside;f=bluechips%2Ftemplates%2Fstatus%2Findex.mako;h=377179c621c68c43bc153e0a5d71964dea999b96;hb=4d724b5efd7fd7c2c38a25e9d9210fe869aa0441;hp=5e9539dabf3f79565940f06f92a75e2e6d69cab4;hpb=3b864c81e804769f2be45b38c319895d1735aef9;p=bluechips.git
diff --git a/bluechips/templates/status/index.mako b/bluechips/templates/status/index.mako
index 5e9539d..377179c 100644
--- a/bluechips/templates/status/index.mako
+++ b/bluechips/templates/status/index.mako
@@ -1,69 +1,75 @@
<%inherit file="/base.mako"/>
-
Settling Transfers
+
+
Settling Transfers
-% if len(c.settle) == 0:
-
No need! The books are balanced!
-% else:
-
To balance the books, the following transfers need to be made:
+ % if len(c.settle) == 0:
+
No need! The books are balanced!
+ % else:
+
To balance the books, the following transfers need to be made:
-
-
+
+
From |
To |
Amount |
-
- % for transfer in c.settle:
-
- ${transfer[0].username} |
- ${transfer[1].username} |
- ${transfer[2]} |
-
- % endfor
-
-% endif
+
+ % for transfer in c.settle:
+
+ ${transfer[0].name} |
+ ${transfer[1].name} |
+ ${transfer[2]} |
+
+ % endfor
+ % if c.net != 0:
+
+
+ % if c.net > 0:
+ The group owes you:
+ % elif c.net < 0:
+ You owe the group:
+ % endif
+ |
+ ${abs(c.net)} |
+
+ % endif
+
+ % endif
+
-Totals
+
+
Totals
-
-
- Total |
- ${c.total} |
-
-
- Past year |
- ${c.year_total} |
-
+
- Year to date |
- ${c.this_year_total} |
+ |
+ Everyone |
+ My Share |
-
- Month to date |
- ${c.this_month_total} |
-
-
- Last month |
- ${c.last_month_total} |
-
-
-
-Add a new transaction
-
-
- - ${h.link_to('Expenditure for the group', h.url_for(controller='spend', action='index'))}
- - ${h.link_to('Transfer between two people', h.url_for(controller='transfer', action='index'))}
-
-
-Your History
+ % for period in ('Total', 'Past year', 'Year to date', 'Month to date', 'Last month'):
+
+ ${period} |
+ % for scope in ('all', 'mine'):
+ ${c.totals[period][scope]} |
+ % endfor
+
+ % endfor
+
+
-${h.link_to('See all history', h.url_for(controller='history',
- action='index'))}
+
+
+ Your History
+
+ ${h.link_to('See all history', h.url_for(controller='history', action='index'))}
+
+
-Expenditures
+ Expenditures
-${self.listExpenditures(c.expenditures)}
+ ${self.listExpenditures(c.expenditures)}
-Transfers
+ Transfers
-${self.listTransfers(c.transfers)}
+ ${self.listTransfers(c.transfers)}
+