]> asedeno.scripts.mit.edu Git - bluechips.git/blobdiff - bluechips/templates/status/index.mako
cleaned up status page a bit
[bluechips.git] / bluechips / templates / status / index.mako
index 060bd4e48471f8182da875020273e49f43700ffe..12b4d2a3fbb745d873d8cb0c1f149ecf9cf0e6e5 100644 (file)
@@ -1,69 +1,63 @@
 <%inherit file="/base.mako"/>
 
-<h2>Settling Transfers</h2>
+<div class="block">
+  <h2>Settling Transfers</h2>
 
-% if len(c.settle) == 0:
-<p>No need! The books are balanced!</p>
-% else:
-<p>To balance the books, the following transfers need to be made:</p>
+  % if len(c.settle) == 0:
+    <p>No need! The books are balanced!</p>
+  % else:
+    <p>To balance the books, the following transfers need to be made:</p>
 
-<table>
-    <tr>
+    <table id="balance">
+      <tr>
         <th>From</th>
         <th>To</th>
         <th>Amount</th>
-    </tr>
-    % for transfer in c.settle:
+      </tr>
+      % for transfer in c.settle:
+        <tr>
+          <td>${transfer[0].username}</td>
+          <td>${transfer[1].username}</td>
+          <td>${transfer[2]}</td>
+        </tr>
+      % endfor
+    </table>
+  % endif
+</div>
+
+<div class="block">
+  <h2>Totals</h2>
+
+  <table id="totals">
     <tr>
-        <td>${transfer[0].username}</td>
-        <td>${transfer[1].username}</td>
-        <td>$${h.round_currency(transfer[2])}</td>
+      <td class="scope"></td>
+      <th class="scope">Everyone</th>
+      <th class="scope">My Share</th>
     </tr>
+    % for period in ('Total', 'Past year', 'Year to date', 'Month to date', 'Last month'):
+      <tr>
+        <th>${period}</th>
+        % for scope in ('all', 'mine'):
+          <td>${c.totals[period][scope]}</td>
+        % endfor
+      </tr>
     % endfor
-</table>
-% endif
-
-<h2>Totals</h2>
-
-<table>
-    <tr>
-        <td>Total</td>
-        <td>$${h.round_currency(c.total)}</td>
-    </tr>
-    <tr>
-        <td>Past year</td>
-        <td>$${h.round_currency(c.year_total)}</td>
-    </tr>
-    <tr>
-        <td>Year to date</td>
-        <td>$${h.round_currency(c.this_year_total)}</td>
-    </tr>
-    <tr>
-        <td>Month to date</td>
-        <td>$${h.round_currency(c.this_month_total)}</td>
-    </tr>
-    <tr>
-        <td>Last month</td>
-        <td>$${h.round_currency(c.last_month_total)}</td>
-    </tr>
-</table>
-
-<h2>Add a new transaction</h2>
-
-<ul>
-    <li>${h.link_to('Expenditure for the group', h.url_for(controller='spend', action='index'))}</li>
-    <li>${h.link_to('Transfer between two people', h.url_for(controller='transfer', action='index'))}</li>
-</ul>
-
-<h2>Your History</h2>
+  </table>
+</div>
 
-${h.link_to('See all history', h.url_for(controller='history',
-                                         action='index'))}
+<div class="block">
+  <h2>
+    Your History
+    <span class="see-all">
+      ${h.link_to('See all history', h.url_for(controller='history', action='index'))}
+    </span>
+  </h2>
 
-<h3>Expenditures</h3>
+  <h3>Expenditures</h3>
 
-${self.listExpenditures(c.expenditures)}
+  ${self.listExpenditures(c.expenditures)}
 
-<h3>Transfers</h3>
+  <h3>Transfers</h3>
 
-${self.listTransfers(c.transfers)}
+  ${self.listTransfers(c.transfers)}
+</div>