]> projects.mako.cc - iron-blogger/blob - templates/week.tmpl
Prepare for floating-point values in ledger
[iron-blogger] / templates / week.tmpl
1 Results for week beginning ${week_start.strftime("%F")}
2 <h2>People who posted</h2>
3 <dl>
4 % for u in sorted(good, key=lambda u:u.username):
5 <dt><span class="user">${u.username}:</span></dt>
6 <dd>
7   <ul>
8  % for p in u.weeks[week]:
9    <li><a href="${p['url']}">${p['title'] or "[untitled post]"}</a></li>
10  % endfor
11   </ul>
12 </dd>
13 % endfor
14 </dl>
15
16 <h2>People who failed to post</h2>
17 <ul>
18 % for u in sorted(lame, key=lambda u:u.username):
19 <li class="user">${u.username}</li>
20 % endfor
21 </ul>
22
23 % if skip:
24 <h2>People who have not yet started</h2>
25 <ul>
26 % for u in sorted(skip, key=lambda u:u.username):
27   <li class="user">${u.username}</li>
28 % endfor
29 </ul>
30 % endif
31
32 <h2>Beer pool:</h2>
33 <table>
34   <tr> <td> This week: </td> <td> $${5 * len(lame)} </td> </tr>
35   <tr> <td> Total: </td> <td> $${pool} </td> </tr>
36   <tr> <td> Paid: </td> <td> $${paid} </td> </tr>
37 </table>
38
39 <h2>Debts:</h2>
40 <% i = 0 %>
41 <table class="debts">
42 % for (u, v) in sorted(debts, key=lambda p:p[1], reverse=True):
43 % if i % 3 == 0:
44 <tr>\
45 % endif
46 <% i += 1 %>\
47 <td class="user">${u}</td> <td class="money">$${v}</td>\
48 % if i % 3 == 0:
49 </tr>
50 %endif
51 % endfor
52 % if i % 3 != 0:
53 </tr>
54 %endif
55 </table>

Benjamin Mako Hill || Want to submit a patch?