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('%s/css/main.css' % request.script_name)}
8 ${h.stylesheet_link('//ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/flick/jquery-ui.css')}
9 ${h.javascript_link('//ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js')}
10 ${h.javascript_link('//ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js')}
11 ${h.javascript_link('%s/js/admin.js' % request.script_name)}
16 <a href="${h.url_for(request.url, use_non_mobile='no')}">Use mobile interface</a>
19 <div id="nav" class="block">
32 <a href="${h.url_for(controller='status', action='index')}">
33 <img src="${request.script_name}/icons/status.png" alt="">
34 <span>Dashboard</span>
38 <a href="${h.url_for(controller='spend', action='index')}">
39 <img src="${request.script_name}/icons/spend.png" alt="">
44 <a href="${h.url_for(controller='transfer', action='index')}">
45 <img src="${request.script_name}/icons/transfer.png" alt="">
50 <a href="${h.url_for(controller='history', action='index')}">
51 <img src="${request.script_name}/icons/history.png" alt="">
56 <a href="${h.url_for(controller='user', action='index')}">
57 <img src="${request.script_name}/icons/user.png" alt="">
64 % for message in h.flash.pop_messages():
65 <div class="flash">${str(message) | n}</div>
73 <%def name="title()">BlueChips
79 <%def name="formatUser(user)">
80 % if user == request.environ['user']:
87 <%def name="listExpenditures(es, total=None, share=None)">
90 <th class="date">Date</th>
91 <th class="user">Spender</th>
92 <th class="description">Description</th>
93 <th class="amount">Amount</th>
94 <th class="share">My Share</th>
95 <th class="editlink"></th>
99 if e.involves(request.environ['user']):
100 klass = 'user-involved'
102 klass = 'user-not-involved'
104 <tr class="${klass}">
105 <td class="date">${e.date}</td>
106 <td class="user">${formatUser(e.spender)}</td>
107 <td class="description">${e.description}</td>
108 <td class="amount">${e.amount}</td>
109 <td class="share">${e.share(request.environ['user'])}</td>
110 <td class="editlink">${h.link_to('Edit', h.url_for(controller='spend', action='edit', id=e.id))}</td>
113 % if total is not None and share is not None:
114 <tr class="user-involved">
115 <td class="total" colspan=3></td>
116 <td class="total">${total}</td>
117 <td class="total">${share}</td>
118 <td class="total"></td>
125 <%def name="listTransfers(ts)">
128 <th class="date">Date</th>
129 <th class="user">From</th>
130 <th class="user">To</th>
131 <th class="description">Description</th>
132 <th class="amount">Amount</th>
133 <th class="editlink"></th>
137 if t.involves(request.environ['user']):
138 klass = 'user-involved'
140 klass = 'user-not-involved'
142 <tr class="${klass}">
143 <td class="date">${t.date}</td>
144 <td class="user">${formatUser(t.debtor)}</td>
145 <td class="user">${formatUser(t.creditor)}</td>
146 <td class="description">${t.description}</td>
147 <td class="amount">${t.amount}</td>
148 <td class="editlink">${h.link_to('Edit', h.url_for(controller='transfer', action='edit', id=t.id))}</td>
154 <%def name="listTags()">
156 x = ',\n'.join([h.link_to(tag.name, h.url_for(controller='history', action='tag', id=tag.id)) for tag in c.tags])
162 <%def name="expenditureIcon()">
163 ←<span class="dollarsign">→
166 <%def name="transferIcon()">
167 <span class="dollarsign">$</span>→<span class="dollarsign">$</span>