<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>
- <% messages = h.flash.pop_messages() %>
- % if messages:
- <ul id="flash-messages">
- % for message in messages:
- <li>${message}</li>
- % endfor
- </ul>
- % endif
<div id="nav" class="block">
<table>
<tr>
<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>
+ % for message in h.flash.pop_messages():
+ <div class="flash">${message | n}</div>
+ % endfor
<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>
</%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'