X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;ds=sidebyside;f=bluechips%2Ftemplates%2Fbase.mako;h=73fb66404aa1cd1775c2fea28a22d19cb53014e1;hb=f176ae9c41af71fd4504327a3f1123768b2f29bb;hp=d12f45688243b2b7e4d40ce4dd62f2a9a7df49bf;hpb=eadf3c3a4e49086b24dd61ead8ea95cdada8b88a;p=bluechips.git diff --git a/bluechips/templates/base.mako b/bluechips/templates/base.mako index d12f456..73fb664 100644 --- a/bluechips/templates/base.mako +++ b/bluechips/templates/base.mako @@ -7,14 +7,6 @@ ${h.stylesheet_link('/css/main.css')} - <% messages = h.flash.pop_messages() %> - % if messages: - - % endif + % for message in h.flash.pop_messages(): +
${message | n}
+ % endfor
${next.body()}
@@ -67,8 +62,8 @@ <%def name="formatUser(user)"> - % if user.username == request.environ['REMOTE_USER']: - ${user.name} + % if user == c.user: + Me % else: ${user.name} % endif @@ -84,7 +79,13 @@ % for e in es: - + <% + if e.involves(c.user): + klass = 'user-involved' + else: + klass = 'user-not-involved' + %> + ${e.date} ${formatUser(e.spender)} ${e.description} @@ -106,7 +107,13 @@ % for t in ts: - + <% + if t.involves(c.user): + klass = 'user-involved' + else: + klass = 'user-not-involved' + %> + ${t.date} ${formatUser(t.debtor)} ${formatUser(t.creditor)}