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/status.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="">
48 <a href="${h.url_for(controller='user', action='index', id=None)}">
49 <img src="/icons/user.png" alt="">
56 % for message in h.flash.pop_messages():
57 <div class="flash">${message | n}</div>
62 ${h.javascript_link('/js/jquery-1.3.2.js')}
63 ${h.javascript_link('/js/jquery.date_input.js')}
64 ${h.javascript_link('/js/admin.js')}
68 <%def name="title()">BlueChips
74 <%def name="formatUser(user)">
75 % if user == request.environ['user']:
82 <%def name="listExpenditures(es)">
85 <th class="date">Date</th>
86 <th class="user">Spender</th>
87 <th class="description">Description</th>
88 <th class="amount">Amount</th>
89 <th class="share">My Share</th>
90 <th class="editlink"></th>
91 <th class="deletelink"></th>
95 if e.involves(request.environ['user']):
96 klass = 'user-involved'
98 klass = 'user-not-involved'
100 <tr class="${klass}">
101 <td class="date">${e.date}</td>
102 <td class="user">${formatUser(e.spender)}</td>
103 <td class="description">${e.description}</td>
104 <td class="amount">${e.amount}</td>
105 <td class="share">${e.share(request.environ['user'])}</td>
106 <td class="editlink">${h.link_to('Edit', h.url_for(controller='spend', action='edit', id=e.id))}</td>
107 <td class="deletelink">${h.link_to('Delete', h.url_for(controller='spend', action='delete', id=e.id))}</td>
113 <%def name="listTransfers(ts)">
116 <th class="date">Date</th>
117 <th class="user">From</th>
118 <th class="user">To</th>
119 <th class="description">Description</th>
120 <th class="amount">Amount</th>
121 <th class="editlink"></th>
122 <th class="deletelink"></th>
126 if t.involves(request.environ['user']):
127 klass = 'user-involved'
129 klass = 'user-not-involved'
131 <tr class="${klass}">
132 <td class="date">${t.date}</td>
133 <td class="user">${formatUser(t.debtor)}</td>
134 <td class="user">${formatUser(t.creditor)}</td>
135 <td class="description">${t.description}</td>
136 <td class="amount">${t.amount}</td>
137 <td class="editlink">${h.link_to('Edit', h.url_for(controller='transfer', action='edit', id=t.id))}</td>
138 <td class="deletelink">${h.link_to('Delete', h.url_for(controller='transfer', action='delete', id=t.id))}</td>
144 <%def name="expenditureIcon()">
145 ←<span class="dollarsign">→
148 <%def name="transferIcon()">
149 <span class="dollarsign">$</span>→<span class="dollarsign">$</span>