1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5 <meta http-equiv="content-type" content="text/html; charset=utf-8" />
6 <title>${self.title()}</title>
7 ${h.stylesheet_link('/css/main.css')}
10 <div id="nav" class="block">
23 <a href="${h.url_for(controller='status', action='index', id=None)}">
24 <img src="/icons/dashboard.png" alt="">
25 <span>Dashboard</span>
29 <a href="${h.url_for(controller='spend', action='index', id=None)}">
30 <img src="/icons/spend.png" alt="">
35 <a href="${h.url_for(controller='transfer', action='index', id=None)}">
36 <img src="/icons/transfer.png" alt="">
41 <a href="${h.url_for(controller='history', action='index', id=None)}">
42 <img src="/icons/history.png" alt="">
49 % for message in h.flash.pop_messages():
50 <div class="flash">${message | n}</div>
58 <%def name="title()">BlueChips
64 <%def name="formatUser(user)">
72 <%def name="listExpenditures(es)">
75 <th class="date">Date</th>
76 <th class="user">Spender</th>
77 <th class="description">Description</th>
78 <th class="amount">Amount</th>
79 <th class="editlink"></th>
83 if e.involves(c.user):
84 klass = 'user-involved'
86 klass = 'user-not-involved'
89 <td class="date">${e.date}</td>
90 <td class="user">${formatUser(e.spender)}</td>
91 <td class="description">${e.description}</td>
92 <td class="amount">${e.amount}</td>
93 <td class="editlink">${h.link_to('Edit', h.url_for(controller='spend', action='edit', id=e.id))}</td>
99 <%def name="listTransfers(ts)">
102 <th class="date">Date</th>
103 <th class="user">From</th>
104 <th class="user">To</th>
105 <th class="description">Description</th>
106 <th class="amount">Amount</th>
107 <th class="editlink"></th>
111 if t.involves(c.user):
112 klass = 'user-involved'
114 klass = 'user-not-involved'
116 <tr class="${klass}">
117 <td class="date">${t.date}</td>
118 <td class="user">${formatUser(t.debtor)}</td>
119 <td class="user">${formatUser(t.creditor)}</td>
120 <td class="description">${t.description}</td>
121 <td class="amount">${t.amount}</td>
122 <td class="editlink">${h.link_to('Edit', h.url_for(controller='transfer', action='edit', id=t.id))}</td>
128 <%def name="expenditureIcon()">
129 ←<span class="dollarsign">→
132 <%def name="transferIcon()">
133 <span class="dollarsign">$</span>→<span class="dollarsign">$</span>