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('//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('/js/admin.js')}
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', id=None)}">
33 <img src="/icons/status.png" alt="">
34 <span>Dashboard</span>
38 <a href="${h.url_for(controller='spend', action='index', id=None)}">
39 <img src="/icons/spend.png" alt="">
44 <a href="${h.url_for(controller='transfer', action='index', id=None)}">
45 <img src="/icons/transfer.png" alt="">
50 <a href="${h.url_for(controller='history', action='index', id=None)}">
51 <img src="/icons/history.png" alt="">
56 <a href="${h.url_for(controller='user', action='index', id=None)}">
57 <img src="/icons/user.png" alt="">
64 % for message in h.flash.pop_messages():
65 <div class="flash">${message | n}</div>
73 <%def name="title()">BlueChips
79 <%def name="formatUser(user)">
80 % if user == request.environ['user']:
87 <%def name="listExpenditures(es)">
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>
96 <th class="deletelink"></th>
100 if e.involves(request.environ['user']):
101 klass = 'user-involved'
103 klass = 'user-not-involved'
105 <tr class="${klass}">
106 <td class="date">${e.date}</td>
107 <td class="user">${formatUser(e.spender)}</td>
108 <td class="description">${e.description}</td>
109 <td class="amount">${e.amount}</td>
110 <td class="share">${e.share(request.environ['user'])}</td>
111 <td class="editlink">${h.link_to('Edit', h.url_for(controller='spend', action='edit', id=e.id))}</td>
112 <td class="deletelink">${h.link_to('Delete', h.url_for(controller='spend', action='delete', id=e.id))}</td>
118 <%def name="listTransfers(ts)">
121 <th class="date">Date</th>
122 <th class="user">From</th>
123 <th class="user">To</th>
124 <th class="description">Description</th>
125 <th class="amount">Amount</th>
126 <th class="editlink"></th>
127 <th class="deletelink"></th>
131 if t.involves(request.environ['user']):
132 klass = 'user-involved'
134 klass = 'user-not-involved'
136 <tr class="${klass}">
137 <td class="date">${t.date}</td>
138 <td class="user">${formatUser(t.debtor)}</td>
139 <td class="user">${formatUser(t.creditor)}</td>
140 <td class="description">${t.description}</td>
141 <td class="amount">${t.amount}</td>
142 <td class="editlink">${h.link_to('Edit', h.url_for(controller='transfer', action='edit', id=t.id))}</td>
143 <td class="deletelink">${h.link_to('Delete', h.url_for(controller='transfer', action='delete', id=t.id))}</td>
149 <%def name="expenditureIcon()">
150 ←<span class="dollarsign">→
153 <%def name="transferIcon()">
154 <span class="dollarsign">$</span>→<span class="dollarsign">$</span>