show award discount on profiles and /shop/awards
parent
0db2bc4f9a
commit
a0063bf6e7
|
@ -449,6 +449,12 @@ class User(Base):
|
|||
|
||||
return discount
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def formatted_discount(self):
|
||||
discount = 100 - int(self.discount * 100)
|
||||
return f'%{discount}'
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def can_view_offsitementions(self):
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
{% if FEATURES['MARSEYBUX'] %}
|
||||
<li>Your current marseybux: {{"{:,}".format(v.marseybux)}}</li>
|
||||
{% endif %}
|
||||
<li>Your total award discount: {{v.formatted_discount}}</li>
|
||||
</ul>
|
||||
</header>
|
||||
{% endblock %}
|
||||
|
|
|
@ -228,6 +228,8 @@
|
|||
<p id="profile--info--lifetime-donated">Lifetime Donated: ${{u.lifetime_donated}} (Shown to you only)</p>
|
||||
{% endif %}
|
||||
|
||||
<p id="profile--info--discount">Total award discount: {{u.formatted_discount}}</p>
|
||||
|
||||
{% if u.is_private %}
|
||||
<p id="profile--info--private">User has private mode enabled</p>
|
||||
{% endif %}
|
||||
|
@ -504,6 +506,8 @@
|
|||
<p id="profile-mobile--info--lifetime-donated">Lifetime Donated: ${{u.lifetime_donated}} (Shown to you only)</p>
|
||||
{% endif %}
|
||||
|
||||
<p id="profile-mobile--info--discount">Total award discount: {{u.formatted_discount}}</p>
|
||||
|
||||
{% if u.is_private %}
|
||||
<p id="profile-mobile--info--private">User has private mode enabled</p>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue