mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Show number of gildings in private info
This number is only available when viewing self or as an admin.
This commit is contained in:
@@ -2206,6 +2206,14 @@ class ProfileBar(Templated):
|
||||
msg = msg % dict(creddits=user.gold_creddits)
|
||||
self.gold_creddit_message = msg
|
||||
|
||||
if user.num_gildings > 0 and self.show_private_info:
|
||||
gildings_msg = ungettext(
|
||||
"%(gildings)s gilding given out",
|
||||
"%(gildings)s gildings given out",
|
||||
user.num_gildings)
|
||||
gildings_msg = gildings_msg % dict(gildings=user.num_gildings)
|
||||
self.num_gildings_message = gildings_msg
|
||||
|
||||
if not self.viewing_self:
|
||||
self.goldlink = "/gold?goldtype=gift&recipient=" + user.name
|
||||
self.giftmsg = _("give reddit gold to %(user)s to show "
|
||||
|
||||
@@ -140,6 +140,12 @@
|
||||
${plain_link(thing.gold_creddit_message, "/gold?goldtype=gift")}
|
||||
</div>
|
||||
%endif
|
||||
%if hasattr(thing, "num_gildings_message"):
|
||||
<div>
|
||||
<br>
|
||||
${thing.num_gildings_message}
|
||||
</div>
|
||||
%endif
|
||||
</div>
|
||||
%endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user