]> asedeno.scripts.mit.edu Git - bluechips.git/blobdiff - bluechips/templates/base.mako
added interface to edit email address
[bluechips.git] / bluechips / templates / base.mako
index 73fb66404aa1cd1775c2fea28a22d19cb53014e1..e44a9ee148441d25e668f784c9d19de33091e955 100644 (file)
@@ -5,6 +5,7 @@
     <meta http-equiv="content-type" content="text/html; charset=utf-8" />
     <title>${self.title()}</title>
     ${h.stylesheet_link('/css/main.css')}
+    ${h.stylesheet_link('/js/jquery.date_input.css')}
   </head>
   <body>
     <div id="nav" class="block">
               <span>History</span>
             </a>
           </td>
+          <td>
+            <a href="${h.url_for(controller='user', action='index', id=None)}">
+              <img src="/icons/user.png" alt="">
+              <span>User</span>
+            </a>
+          </td>
         </tr>
       </table>
     </div>
@@ -52,6 +59,9 @@
     <div id="content">
       ${next.body()}
     </div>
+    ${h.javascript_link('/js/jquery-1.3.2.js')}
+    ${h.javascript_link('/js/jquery.date_input.js')}
+    ${h.javascript_link('/js/admin.js')}
   </body>
 </html>
 
@@ -62,7 +72,7 @@
 </%def>
 
 <%def name="formatUser(user)">
-  % if user == c.user:
+  % if user == request.environ['user']:
     <strong>Me</strong>
   % else:
     ${user.name}
       <th class="user">Spender</th>
       <th class="description">Description</th>
       <th class="amount">Amount</th>
+      <th class="share">My Share</th>
       <th class="editlink"></th>
     </tr>
     % for e in es:
       <%
-        if e.involves(c.user):
+        if e.involves(request.environ['user']):
           klass = 'user-involved'
         else:
           klass = 'user-not-involved'
         <td class="user">${formatUser(e.spender)}</td>
         <td class="description">${e.description}</td>
         <td class="amount">${e.amount}</td>
+        <td class="share">${e.share(request.environ['user'])}</td>
         <td class="editlink">${h.link_to('Edit', h.url_for(controller='spend', action='edit', id=e.id))}</td>
       </tr>
     % endfor
     </tr>
     % for t in ts:
       <%
-        if t.involves(c.user):
+        if t.involves(request.environ['user']):
           klass = 'user-involved'
         else:
           klass = 'user-not-involved'