From ed6e60bab4278cad2ffff5d770d3f958c0e00ecf Mon Sep 17 00:00:00 2001 From: Chad Birch Date: Wed, 1 May 2013 10:20:39 -0600 Subject: [PATCH] Add "[score hidden]" markers to alternate views --- r2/r2/templates/comment.compact | 7 ++++++- r2/r2/templates/comment.htmllite | 6 +++++- r2/r2/templates/comment.mobile | 8 +++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/r2/r2/templates/comment.compact b/r2/r2/templates/comment.compact index b15c59afd..f52bf2e12 100644 --- a/r2/r2/templates/comment.compact +++ b/r2/r2/templates/comment.compact @@ -61,7 +61,12 @@
${WrappedUser(thing.author, thing.attribs, thing, gray = collapse).render()} - ${score(thing, thing.likes, tag='span')} + %if thing.score_hidden: + [${_("score hidden")}] + %else: + ${score(thing, thing.likes, tag='span')} + %endif + ## thing.timesince is a cache stub ${unsafe(_("%(timeago)s ago") % dict(timeago=thing.timesince))} % if thing.gilded_message: diff --git a/r2/r2/templates/comment.htmllite b/r2/r2/templates/comment.htmllite index 468e7546d..6e812c541 100644 --- a/r2/r2/templates/comment.htmllite +++ b/r2/r2/templates/comment.htmllite @@ -52,7 +52,11 @@ ${thing.author.name} - ${thing.score} ${ungettext("point", "points", thing.score)} + %if thing.score_hidden: + [${_("score hidden")}] + %else: + ${thing.score} ${ungettext("point", "points", thing.score)} + %endif ${thing.timesince} permalink diff --git a/r2/r2/templates/comment.mobile b/r2/r2/templates/comment.mobile index 3a1e0b813..342d8f8df 100644 --- a/r2/r2/templates/comment.mobile +++ b/r2/r2/templates/comment.mobile @@ -49,7 +49,13 @@ ${unsafe(safemarkdown(thing.body, nofollow=thing.nofollow))}