From 6fe4db8eae4dac71c7b2cb9239bdb33a00c64d15 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20H=C3=A4ggqvist?= Date: Sat, 27 Aug 2011 21:37:04 +0200 Subject: [PATCH] Move [deleted] logic into wrappeduser.mobile, add author class. --- r2/r2/templates/printable.mobile | 15 --------------- r2/r2/templates/wrappeduser.mobile | 18 +++++++++++------- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/r2/r2/templates/printable.mobile b/r2/r2/templates/printable.mobile index 3d377a422..78a984c45 100644 --- a/r2/r2/templates/printable.mobile +++ b/r2/r2/templates/printable.mobile @@ -46,22 +46,7 @@ <%def name="author(friend = False, gray = False)" buffered="True"> - %if WrappedUser(thing.author).user_deleted: - [deleted] - %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 name="score(this, likes=None, inline=True, label = True, _id = True)"> diff --git a/r2/r2/templates/wrappeduser.mobile b/r2/r2/templates/wrappeduser.mobile index 55dbd9c19..d95f41394 100644 --- a/r2/r2/templates/wrappeduser.mobile +++ b/r2/r2/templates/wrappeduser.mobile @@ -27,11 +27,15 @@ else: flair = False %> -%if flair and flair_left: -${flair} -%endif -0< -${thing.name} -%if flair and not flair_left: -${flair} +%if WrappedUser(thing.author).user_deleted: + [deleted] +%else: + %if flair and flair_left: + ${flair} + %endif + + ${thing.name} + %if flair and not flair_left: + ${flair} + %endif %endif