Show gold recurring subscriptions on user page.

This commit is contained in:
Brian Simpson
2011-08-08 13:52:32 -07:00
parent 9ddd13846c
commit a15714c798
2 changed files with 14 additions and 0 deletions

View File

@@ -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" %

View File

@@ -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>
&#32;
${thing.gold_subscr_id}
</div>
%endif
</div>
%endif