User based option to switch off Twitter links
add "twitter: no" to the specified user in bloggers.yml to turn off the Twitter link for this user.
This commit is contained in:
parent
cf11d9f4d8
commit
9c8654b674
|
@ -90,6 +90,7 @@ def render_template(path, week=None, **kwargs):
|
|||
u.username = un
|
||||
u.name = rec['name']
|
||||
u.links = rec['links']
|
||||
u.twitter = rec.get('twitter')
|
||||
u.start_de = datetime.datetime.strptime(rec['start'],"%Y/%m/%d").strftime("%d.%m.%Y")
|
||||
u.start = rec['start']
|
||||
u.end = rec.get('end')
|
||||
|
|
|
@ -8,7 +8,11 @@
|
|||
% for u in sorted(userlist, key=lambda u:u.username):
|
||||
<tr>
|
||||
<td align="left" valign="top">${u.name}</td>
|
||||
<td align="left" valign="top"><a href="https://twitter.com/#!/${u.username}">@${u.username}</a></td>
|
||||
<td align="left" valign="top">
|
||||
% if u.twitter != False:
|
||||
<a href="https://twitter.com/#!/${u.username}">@${u.username}</a>
|
||||
% endif
|
||||
</td>
|
||||
<td align="left" valign="top">
|
||||
% if u.links:
|
||||
% for a in u.links:
|
||||
|
|
|
@ -2,7 +2,11 @@ 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>
|
||||
<dt><span class="user"><strong>${u.name} </strong> \
|
||||
% if u.twitter != False:
|
||||
<a href="https://twitter.com/#!/${u.username}">@${u.username}</a> \
|
||||
% endif
|
||||
:</span></dt>
|
||||
<dd>
|
||||
<ul>
|
||||
% for p in u.weeks[week]:
|
||||
|
@ -16,7 +20,11 @@ Results for week beginning ${week_start.strftime("%F")}
|
|||
<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>
|
||||
<li class="user"><strong>${u.name} </strong> \
|
||||
% if u.twitter != False:
|
||||
<a href="https://twitter.com/#!/${u.username}">@${u.username}</a> \
|
||||
% endif
|
||||
</li>
|
||||
% endfor
|
||||
</ul>
|
||||
|
||||
|
@ -33,7 +41,11 @@ Results for week beginning ${week_start.strftime("%F")}
|
|||
<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>
|
||||
<li class="user"><strong>${u.name} </strong> \
|
||||
% if u.twitter != False:
|
||||
- <a href="https://twitter.com/#!/${u.username}">@${u.username}</a> \
|
||||
% endif
|
||||
</li>
|
||||
% endfor
|
||||
</ul>
|
||||
% endif
|
||||
|
@ -63,10 +75,3 @@ Results for week beginning ${week_start.strftime("%F")}
|
|||
</tr>
|
||||
%endif
|
||||
</table>
|
||||
|
||||
<h2>Previously Punted (pay €30 to return):</h2>
|
||||
<ul>
|
||||
% for (u) in sorted(punted, key=lambda p:p.username):
|
||||
<li>${u.username} (${u.end})</li>
|
||||
% endfor
|
||||
</ul>
|
Loading…
Reference in a new issue