mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-01-24 14:27:58 -05:00
Show gold recurring subscriptions on user page.
This commit is contained in:
@@ -1189,6 +1189,8 @@ class ProfileBar(Templated):
|
||||
else:
|
||||
self.gold_remaining = timeuntil(self.gold_expiration,
|
||||
precision=60 * 60 * 24 * 30) # months
|
||||
if hasattr(user, "gold_subscr_id"):
|
||||
self.gold_subscr_id = user.gold_subscr_id
|
||||
if user._id != c.user._id:
|
||||
self.goldlink = "/gold?goldtype=gift&recipient=" + user.name
|
||||
self.giftmsg = _("buy %(user)s a month of reddit gold" %
|
||||
|
||||
@@ -109,6 +109,18 @@
|
||||
 
|
||||
${_("of reddit gold remaining")}
|
||||
</div>
|
||||
%if getattr(thing, "gold_subscr_id", None):
|
||||
<%
|
||||
paypal_link = ("https://www.paypal.com/cgi-bin/webscr?cmd=_subscr-find&alias=%s" % g.goldthanks_email)
|
||||
%>
|
||||
<div>
|
||||
<a href=${paypal_link}>
|
||||
${_("Recurring Paypal subscription")}
|
||||
</a>
|
||||
 
|
||||
${thing.gold_subscr_id}
|
||||
</div>
|
||||
%endif
|
||||
</div>
|
||||
%endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user