forked from MarseyWorld/MarseyWorld
add effortposts made parameter to profiles
parent
0255bd115c
commit
3a31ae9019
|
@ -1326,6 +1326,11 @@ class User(Base):
|
|||
|
||||
return f'<div id="signature-{self.id}" class="user-signature"><hr>{self.sig_html}</div>'
|
||||
|
||||
@property
|
||||
@lazy
|
||||
def effortposts_made(self):
|
||||
return g.db.query(Post).filter_by(author_id=self.id, effortpost=True).count()
|
||||
|
||||
|
||||
badge_ordering_tuple = (
|
||||
22, 23, 24, 25, 26, 27, 28, #paypig
|
||||
|
|
|
@ -280,6 +280,10 @@
|
|||
<p id="profile--info--discount">Total award discount: {{u.formatted_award_discount}} (shown to you only)</p>
|
||||
{% endif %}
|
||||
|
||||
<p id="profile--info--effortposts">
|
||||
Effortposts made: <a href='/search/posts?q=author:{{u.username}}+effortpost:true'>{{u.effortposts_made}}</a>
|
||||
</p>
|
||||
|
||||
{% if u.is_private %}
|
||||
<p id="profile--info--private">User has private mode enabled</p>
|
||||
{% endif %}
|
||||
|
@ -589,6 +593,10 @@
|
|||
<p id="profile-mobile--info--discount">Total award discount: {{u.formatted_award_discount}} (shown to you only)</p>
|
||||
{% endif %}
|
||||
|
||||
<p id="profile-mobile--info--effortposts">
|
||||
Effortposts made: <a href='/search/posts?q=author:{{u.username}}+effortpost:true'>{{u.effortposts_made}}</a>
|
||||
</p>
|
||||
|
||||
{% if u.is_private %}
|
||||
<p id="profile-mobile--info--private">User has private mode enabled</p>
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in New Issue