iron-blogger/templates/week.tmpl

123 lines
3.0 KiB
Cheetah

Zusammenfassung der Woche ab ${week_start.strftime("%d.%m.%Y")}
<h3>Die Flei&szlig;igen:</h3>
<dl>
% for u in sorted(userlist, key=lambda u:u.name[u.name.rfind(' '):].lower()):
% for g in u.goodblogs:
% for b in u.links:
% if b[0] == g:
<dt><span class="user"><strong>${u.name} </strong> \
% if u.twitter != False:
(@<a href="http://twitter.com/${u.username}">${u.username}</a>) \
% endif
% if len(u.links) != 1:
in <a href="${b[2]}">${b[1]}</a> \
% endif
:</span></dt>
<dd>
<% pc=0 %><ul>
% for p in sorted(u.posts[g][week], key = lambda p:p['date']):
% if pc < 10 or len(u.posts[g][week]) == 11:
<% pc+=1 %><li><a href="${p['url']}">${p['title'] or "[ohne Titel]"}</a></li>
%endif
% endfor
% if len(u.posts[g][week]) > 11:
<li>und <a href="${b[2]}">${len(u.posts[g][week])-10} weitere Artikel</a>...</li>
% endif
</ul>
</dd>
% endif
% endfor
% endfor
% endfor
</dl>
<h3>Die Faulen:</h3> <% lame=0 %>
<ul>
% for u in sorted(userlist, key=lambda u:u.name[u.name.rfind(' '):].lower()):
% for g in u.lameblogs:
% for b in u.links:
% if b[0] == g:
<li class="user"><strong>${u.name} </strong> <% lame+=1 %> \
% if u.twitter != False:
(@<a href="http://twitter.com/${u.username}">${u.username}</a>) \
% endif
% if len(u.links) != 1:
in <a href="${b[2]}">${b[1]}</a> \
% endif
</li>
% endif
% endfor
% endfor
% endfor
</ul>
% if punt:
<h3>Ausgeschieden wegen zu hoher Schulden:</h3>
<ul>
% for u in sorted(punt):
<li class="user">${u}</li>
% endfor
</ul>
% endif
% if skip:
<h3>Noch nicht dabei:</h3>
<ul>
% for u in sorted(skip, key=lambda u:u.name[u.name.rfind(' '):].lower()):
<li class="user"><strong>${u.name} </strong> \
% if u.twitter != False:
(@<a href="http://twitter.com/${u.username}">${u.username}</a>) \
% endif
</li>
% endfor
</ul>
% endif
% if skipped_users:
<h3>Gerade im Urlaub:</h3>
<ul>
% for u in sorted(skipped_users, key=lambda u:u.name[u.name.rfind(' '):].lower()):
<li class="user"><strong>${u.name} </strong> \
% if u.twitter != False:
(@<a href="http://twitter.com/${u.username}">${u.username}</a>) \
% endif
</li>
% endfor
</ul>
% endif
<h3>Kasse:</h3>
<table style="border-left-style:none; border-right-style:none;">
<tr> <td> diese Woche: </td> <td> ${5 * lame}&nbsp;&euro; </td> </tr>
<tr> <td> insgesamt: </td> <td> ${pool}&nbsp;&euro;</td> </tr>
<tr> <td> beglichen: </td> <td> ${paid}&nbsp;&euro;</td> </tr>
<tr> <td> verfeiert: </td> <td> ${event}&nbsp;&euro;</td> </tr>
</table>
<h3>Schulden:</h3>
<% 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">${v}&nbsp;&euro;</td>\
% if i % 3 == 0:
</tr>
%endif
% endfor
% if i % 3 != 0:
</tr>
%endif
</table>
% if punted:
<h3>Zuvor ausgeschieden (m&uuml;ssen 30&nbsp;&euro; f&uuml;r den Wiedereinstieg bezahlen):</h3>
<ul>
% for (u) in sorted(punted, key=lambda p:p.name[p.name.rfind(' '):].lower()):
<li>${u.name} (seit ${u.end_de})</li>
% endfor
</ul>
% endif