]> asedeno.scripts.mit.edu Git - bluechips.git/blobdiff - bluechips/templates/status/index.mako
use real names for transfer list, for consistency
[bluechips.git] / bluechips / templates / status / index.mako
index f1c21e364d02fac36bc21e5067492682b6d1b2f8..bf4eb7b6b84c1556efd5a94c82d72d0942bf63d9 100644 (file)
@@ -8,7 +8,7 @@
   % else:
     <p>To balance the books, the following transfers need to be made:</p>
 
-    <table>
+    <table id="balance">
       <tr>
         <th>From</th>
         <th>To</th>
@@ -16,8 +16,8 @@
       </tr>
       % for transfer in c.settle:
         <tr>
-          <td>${transfer[0].username}</td>
-          <td>${transfer[1].username}</td>
+          <td>${transfer[0].name}</td>
+          <td>${transfer[1].name}</td>
           <td>${transfer[2]}</td>
         </tr>
       % endfor
 
   <table id="totals">
     <tr>
-      <th>Total</th>
-      <td>${c.total}</td>
-    </tr>
-    <tr>
-      <th>Past year</th>
-      <td>${c.year_total}</td>
-    </tr>
-    <tr>
-      <th>Year to date</th>
-      <td>${c.this_year_total}</td>
-    </tr>
-    <tr>
-      <th>Month to date</th>
-      <td>${c.this_month_total}</td>
-    </tr>
-    <tr>
-      <th>Last month</th>
-      <td>${c.last_month_total}</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>
 </div>
 
 <div class="block">
-  <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>
-</div>
-
-<div class="block">
-  <h2>Your History</h2>
-
-  ${h.link_to('See all history', h.url_for(controller='history', action='index'))}
+  <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>