iron-blogger/templates/week.tmpl
Marcus -Chaosblog cf11d9f4d8 added code from mako hill to list folks who have previously been punted to the weekly update
added punt listing to the quick view

replaced two tabs with spaces in render.py
2012-07-09 21:02:51 +02:00

72 lines
1.8 KiB
Cheetah

Results for week beginning ${week_start.strftime("%F")}
<h2>Who posted:</h2>
<dl>
% for u in sorted(good, key=lambda u:u.username):
<dt><span class="user"><strong>${u.name} - </strong><a href="https://twitter.com/#!/${u.username}">@${u.username}</a>:</span></dt>
<dd>
<ul>
% for p in u.weeks[week]:
<li><a href="${p['url']}">${p['title'] or "[untitled post]"}</a></li>
% endfor
</ul>
</dd>
% endfor
</dl>
<h2>Slackers:</h2>
<ul>
% for u in sorted(lame, key=lambda u:u.username):
<li class="user"><strong>${u.name} </strong>- <a href="https://twitter.com/#!/${u.username}">@${u.username}</a></li>
% endfor
</ul>
% if punt:
<h2>Who was punted for outstanding balances:</h2>
<ul>
% for u in sorted(punt):
<li class="user">${u}</li>
% endfor
</ul>
% endif
% if skip:
<h2>Who haven't started yet:</h2>
<ul>
% for u in sorted(skip, key=lambda u:u.username):
<li class="user"><strong>${u.name} </strong>- <a href="https://twitter.com/#!/${u.username}">@${u.username}</a></li>
% endfor
</ul>
% endif
<h2>Beer fund:</h2>
<table style="border-left-style:none; border-right-style:none;">
<tr> <td> This week: </td> <td> &euro; ${5 * len(lame)} </td> </tr>
<tr> <td> Total: </td> <td> &euro; ${pool} </td> </tr>
<tr> <td> Paid: </td> <td> &euro; ${paid} </td> </tr>
<tr> <td> Events: </td> <td> &euro; ${event} </td> </tr>
</table>
<h2>Debts:</h2>
<% i = 0 %>
<table class="debts" style="border-left-style:none; border-right-style:none;">
% for (u, v) in sorted(debts, key=lambda p:p[1], reverse=True):
% if i % 3 == 0:
<tr>\
% endif
<% i += 1 %>\
<td class="user">${u}</td> <td class="money">&euro; ${v}</td>\
% if i % 3 == 0:
</tr>
%endif
% endfor
% if i % 3 != 0:
</tr>
%endif
</table>
<h2>Previously Punted (pay &euro;30 to return):</h2>
<ul>
% for (u) in sorted(punted, key=lambda p:p.username):
<li>${u.username} (${u.end})</li>
% endfor
</ul>