Add "[score hidden]" markers to alternate views

This commit is contained in:
Chad Birch
2013-05-01 10:20:39 -06:00
committed by Neil Williams
parent 341ad93d4e
commit ed6e60bab4
3 changed files with 18 additions and 3 deletions

View File

@@ -61,7 +61,12 @@
<div class="tagline">
${WrappedUser(thing.author, thing.attribs, thing,
gray = collapse).render()}&#32;
${score(thing, thing.likes, tag='span')}&#32;
%if thing.score_hidden:
[${_("score hidden")}]
%else:
${score(thing, thing.likes, tag='span')}
%endif
&#32;
## thing.timesince is a cache stub
${unsafe(_("%(timeago)s ago") % dict(timeago=thing.timesince))}
% if thing.gilded_message:

View File

@@ -52,7 +52,11 @@
<a href="http://${get_domain()}/user/${thing.author.name}">
<b>${thing.author.name}</b></a>&#32;
<span id="score_${thing._fullname}">
${thing.score} ${ungettext("point", "points", thing.score)}
%if thing.score_hidden:
[${_("score hidden")}]
%else:
${thing.score} ${ungettext("point", "points", thing.score)}
%endif
</span>&#32;
${thing.timesince}
&#32;<a href="${add_sr(thing.permalink)}">permalink</a>

View File

@@ -49,7 +49,13 @@
<p class="byline">
${WrappedUser(thing.author, thing.attribs, thing, gray = collapse).render()}
&nbsp;|<span class="score">${thing.score} ${ungettext("point", "points", thing.score)} </span>
&nbsp;|<span class="score">
%if thing.score_hidden:
[${_("score hidden")}]
%else:
${thing.score} ${ungettext("point", "points", thing.score)}
%endif
</span>
${_("written")} ${thing.timesince} ${_("ago")}
</p>
${unsafe(safemarkdown(thing.body, nofollow=thing.nofollow))}