forked from rDrama/rDrama
show referred_users in /settings/personal
parent
5c6dcc9107
commit
e33e0558f5
|
@ -176,7 +176,7 @@ class User(Base):
|
||||||
authorizations = relationship("ClientAuth", back_populates="user")
|
authorizations = relationship("ClientAuth", back_populates="user")
|
||||||
apps = relationship("OauthApp", back_populates="author")
|
apps = relationship("OauthApp", back_populates="author")
|
||||||
awards = relationship("AwardRelationship", primaryjoin="User.id==AwardRelationship.user_id", back_populates="user")
|
awards = relationship("AwardRelationship", primaryjoin="User.id==AwardRelationship.user_id", back_populates="user")
|
||||||
referrals = relationship("User", primaryjoin="User.id==User.referred_by")
|
referrals = relationship("User", primaryjoin="User.id==User.referred_by", order_by="User.created_utc")
|
||||||
designed_hats = relationship("HatDef", primaryjoin="User.id==HatDef.author_id", back_populates="author")
|
designed_hats = relationship("HatDef", primaryjoin="User.id==HatDef.author_id", back_populates="author")
|
||||||
owned_hats = relationship("Hat", back_populates="owners")
|
owned_hats = relationship("Hat", back_populates="owners")
|
||||||
hats_equipped = relationship("Hat", lazy="raise", viewonly=True)
|
hats_equipped = relationship("Hat", lazy="raise", viewonly=True)
|
||||||
|
|
|
@ -308,6 +308,21 @@
|
||||||
<div class="text-small text-muted mt-3">Share this link with a friend. {% if v.referral_count==0 %} When they sign up, you'll get the bronze recruitment badge. <a href="/badges">Learn more.</a>{% elif v.referral_count<10 %} When you refer 10 friends, you'll receive the silver recruitment badge. <a href="/badges">Learn more.</a>{% elif v.referral_count<100 %} When you refer 100 friends, you'll receive the gold recruitment badge. <a href="/badges">Learn more</a>.{% endif %}</div>
|
<div class="text-small text-muted mt-3">Share this link with a friend. {% if v.referral_count==0 %} When they sign up, you'll get the bronze recruitment badge. <a href="/badges">Learn more.</a>{% elif v.referral_count<10 %} When you refer 10 friends, you'll receive the silver recruitment badge. <a href="/badges">Learn more.</a>{% elif v.referral_count<100 %} When you refer 100 friends, you'll receive the gold recruitment badge. <a href="/badges">Learn more</a>.{% endif %}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% if v.referral_count %}
|
||||||
|
<div class="d-lg-flex border-bottom px-3">
|
||||||
|
<div class="title w-lg-25 px-0">
|
||||||
|
<label>Referred Users</label>
|
||||||
|
</div>
|
||||||
|
<table class="table">
|
||||||
|
{% for user in v.referrals %}
|
||||||
|
<tr>
|
||||||
|
<td>{% include "user_in_table.html" %}</td>
|
||||||
|
<td data-time="{{user.created_utc}}"></td>
|
||||||
|
</tr>
|
||||||
|
{% endfor %}
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue