Move [deleted] logic into wrappeduser.mobile, add author class.

This commit is contained in:
Jonas Häggqvist
2011-08-27 21:37:04 +02:00
committed by Logan Hanks
parent b9f4f970f5
commit 6fe4db8eae
2 changed files with 11 additions and 22 deletions

View File

@@ -46,22 +46,7 @@
</%def>
<%def name="author(friend = False, gray = False)" buffered="True">
%if WrappedUser(thing.author).user_deleted:
<span>[deleted]</span>
%else:
<%
author = thing.author
author_cls = "author"
if friend:
author_cls += " friend"
elif gray:
author_cls += " gray"
name = websafe(author.name)
href = unsafe('href="/user/%s.mobile"' % name)
if c.user_is_admin: name += " (%d)" % (author.link_karma)
%>
${WrappedUser(thing.author, thing.attribs, thing, gray = collapse).render()}
%endif
</%def>
<%def name="score(this, likes=None, inline=True, label = True, _id = True)">

View File

@@ -27,11 +27,15 @@ else:
flair = False
%>
%if flair and flair_left:
<span class="flair">${flair}</span>
%endif
<a href="/user/${thing.name}">0<
<b>${thing.name}</b></a>
%if flair and not flair_left:
<span class="flair">${flair}</span>
%if WrappedUser(thing.author).user_deleted:
<span>[deleted]</span>
%else:
%if flair and flair_left:
<span class="flair">${flair}</span>
%endif
<a href="/user/${thing.name}" class="${thing.author_cls}">
<b>${thing.name}</b></a>
%if flair and not flair_left:
<span class="flair">${flair}</span>
%endif
%endif