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')}
8 ${h.stylesheet_link('/js/jquery.date_input.css')}
11 <div id="nav" class="block">
24 <a href="${h.url_for(controller='status', action='index', id=None)}">
25 <img src="/icons/dashboard.png" alt="">
26 <span>Dashboard</span>
30 <a href="${h.url_for(controller='spend', action='index', id=None)}">
31 <img src="/icons/spend.png" alt="">
36 <a href="${h.url_for(controller='transfer', action='index', id=None)}">
37 <img src="/icons/transfer.png" alt="">
42 <a href="${h.url_for(controller='history', action='index', id=None)}">
43 <img src="/icons/history.png" alt="">
50 % for message in h.flash.pop_messages():
51 <div class="flash">${message | n}</div>
56 ${h.javascript_link('/js/jquery-1.3.2.js')}
57 ${h.javascript_link('/js/jquery.date_input.js')}
58 ${h.javascript_link('/js/admin.js')}
62 <%def name="title()">BlueChips
68 <%def name="formatUser(user)">
69 % if user == request.environ['user']:
76 <%def name="listExpenditures(es)">
79 <th class="date">Date</th>
80 <th class="user">Spender</th>
81 <th class="description">Description</th>
82 <th class="amount">Amount</th>
83 <th class="share">My Share</th>
84 <th class="editlink"></th>
88 if e.involves(request.environ['user']):
89 klass = 'user-involved'
91 klass = 'user-not-involved'
94 <td class="date">${e.date}</td>
95 <td class="user">${formatUser(e.spender)}</td>
96 <td class="description">${e.description}</td>
97 <td class="amount">${e.amount}</td>
98 <td class="share">${e.share(request.environ['user'])}</td>
99 <td class="editlink">${h.link_to('Edit', h.url_for(controller='spend', action='edit', id=e.id))}</td>
105 <%def name="listTransfers(ts)">
108 <th class="date">Date</th>
109 <th class="user">From</th>
110 <th class="user">To</th>
111 <th class="description">Description</th>
112 <th class="amount">Amount</th>
113 <th class="editlink"></th>
117 if t.involves(request.environ['user']):
118 klass = 'user-involved'
120 klass = 'user-not-involved'
122 <tr class="${klass}">
123 <td class="date">${t.date}</td>
124 <td class="user">${formatUser(t.debtor)}</td>
125 <td class="user">${formatUser(t.creditor)}</td>
126 <td class="description">${t.description}</td>
127 <td class="amount">${t.amount}</td>
128 <td class="editlink">${h.link_to('Edit', h.url_for(controller='transfer', action='edit', id=t.id))}</td>
134 <%def name="expenditureIcon()">
135 ←<span class="dollarsign">→
138 <%def name="transferIcon()">
139 <span class="dollarsign">$</span>→<span class="dollarsign">$</span>