forked from rDrama/rDrama
fdsfs
parent
3397263412
commit
b65f81bbcc
|
@ -275,9 +275,8 @@ class User(Base, Stndrd, Age_times):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def banned_by(self):
|
def banned_by(self):
|
||||||
|
|
||||||
if not self.is_suspended: return None
|
if not self.is_suspended: return None
|
||||||
return g.db.query(User).options(lazyload('*')).filter_by(id=self.is_banned).first()
|
return g.db.query(User).filter_by(id=self.is_banned).first()
|
||||||
|
|
||||||
def has_badge(self, badgedef_id):
|
def has_badge(self, badgedef_id):
|
||||||
return self.badges.filter_by(badge_id=badgedef_id).first()
|
return self.badges.filter_by(badge_id=badgedef_id).first()
|
||||||
|
|
|
@ -123,7 +123,7 @@
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if c.bannedfor %}
|
{% if c.bannedfor and c.author.banned_by %}
|
||||||
<a href="javascript:void(0)"><i class="fad fa-gavel text-danger" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="User was banned for this comment by @{{c.author.banned_by.username}}"></i></a>
|
<a href="javascript:void(0)"><i class="fad fa-gavel text-danger" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="User was banned for this comment by @{{c.author.banned_by.username}}"></i></a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
@ -333,7 +333,7 @@
|
||||||
|
|
||||||
{% if v and v.admin_level==6 and v.id != c.author_id %}
|
{% if v and v.admin_level==6 and v.id != c.author_id %}
|
||||||
<li id="unban-{{c.id}}" class="list-inline-item d-none {% if c.author.is_suspended %}d-md-inline-block{% endif %}"><a class="text-success" id="unexile-comment-{{c.id}}" href="javascript:void(0)" onclick="post_toast3('/unban_user/{{c.author_id}}','ban-{{c.id}}','unban-{{c.id}}')"><i class="fas fa-user-slash text-success fa-fw"></i>Unban user</a></li>
|
<li id="unban-{{c.id}}" class="list-inline-item d-none {% if c.author.is_suspended %}d-md-inline-block{% endif %}"><a class="text-success" id="unexile-comment-{{c.id}}" href="javascript:void(0)" onclick="post_toast3('/unban_user/{{c.author_id}}','ban-{{c.id}}','unban-{{c.id}}')"><i class="fas fa-user-slash text-success fa-fw"></i>Unban user</a></li>
|
||||||
<li id="ban-{{c.id}}" class="list-inline-item d-none {% if not c.author.is_suspended %}d-md-inline-block{% endif %}"><a class="text-danger" id="exile-comment-{{c.id}}" href="javascript:void(0)" data-toggle="modal" data-target="#banModal" onclick="banModal('{{c.permalink}}', '{{ c.author.id }}', '{{c.author.username}}')"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</a></li>
|
<li id="ban-{{c.id}}" class="list-inline-item d-none {% if not c.author.is_suspended %}d-md-inline-block{% endif %}"><a class="text-danger" id="exile-comment-{{c.id}}" href="javascript:void(0)" data-toggle="modal" data-target="#banModal" onclick="banModal('/comment/{{c.id}}', '{{ c.author.id }}', '{{c.author.username}}')"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and v.admin_level >=4 and c.oauth_app %}
|
{% if v and v.admin_level >=4 and c.oauth_app %}
|
||||||
|
@ -492,7 +492,7 @@
|
||||||
|
|
||||||
{% if v and (c.post and v.admin_level == 6) %}
|
{% if v and (c.post and v.admin_level == 6) %}
|
||||||
{% if c.author_id != v.id %}
|
{% if c.author_id != v.id %}
|
||||||
<li id="ban2-{{c.id}}" class="{% if c.author.is_suspended %}d-none{% endif %} list-group-item" data-dismiss="modal" data-toggle="modal" data-target="#banModal" onclick="banModal('{{c.permalink}}', '{{ c.author.id }}', '{{c.author.username}}')"><a class="text-danger" id="ban2-comment-{{c.id}}" href="javascript:void(0)"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</a></li>
|
<li id="ban2-{{c.id}}" class="{% if c.author.is_suspended %}d-none{% endif %} list-group-item" data-dismiss="modal" data-toggle="modal" data-target="#banModal" onclick="banModal('/comment/{{c.id}}', '{{ c.author.id }}', '{{c.author.username}}')"><a class="text-danger" id="ban2-comment-{{c.id}}" href="javascript:void(0)"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</a></li>
|
||||||
<li id="unban2-{{c.id}}" class="{% if not c.author.is_suspended %}d-none{% endif %} list-group-item"><a class="text-success d-block" id="unexile-comment2-{{c.id}}" href="javascript:void(0)" onclick="post_toast2('/unban_user/{{c.author_id}}','ban2-{{c.id}}','unban2-{{c.id}}')" data-dismiss="modal"><i class="fas fa-user-minus fa-fw text-success"></i>Unban user</a></li>
|
<li id="unban2-{{c.id}}" class="{% if not c.author.is_suspended %}d-none{% endif %} list-group-item"><a class="text-success d-block" id="unexile-comment2-{{c.id}}" href="javascript:void(0)" onclick="post_toast2('/unban_user/{{c.author_id}}','ban2-{{c.id}}','unban2-{{c.id}}')" data-dismiss="modal"><i class="fas fa-user-minus fa-fw text-success"></i>Unban user</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -179,7 +179,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and v.admin_level == 6 and v.id!=p.author_id %}
|
{% if v and v.admin_level == 6 and v.id!=p.author_id %}
|
||||||
<button id="ban2-{{p.id}}" data-dismiss="modal" data-toggle="modal" data-target="#banModal" onclick="banModal('{{p.permalink}}', '{{ p.author.id }}', '{{p.author.username}}')" class="{% if p.author.is_suspended %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-danger text-left" href="javascript:void(0)"><i class="fas fa-user-minus mr-3"></i>Ban user</a></button>
|
<button id="ban2-{{p.id}}" data-dismiss="modal" data-toggle="modal" data-target="#banModal" onclick="banModal('/post/{{p.id}}', '{{ p.author.id }}', '{{p.author.username}}')" class="{% if p.author.is_suspended %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-danger text-left" href="javascript:void(0)"><i class="fas fa-user-minus mr-3"></i>Ban user</a></button>
|
||||||
<button id="unban2-{{p.id}}" class="{% if not p.author.is_suspended %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-success text-left" href="javascript:void(0)" onclick="post_toast2('/unban_user/{{p.author_id}}','ban2-{{p.id}}','unban2-{{p.id}}')" data-dismiss="modal"><i class="fas fa-user-minus mr-3"></i>Unban user</a></button>
|
<button id="unban2-{{p.id}}" class="{% if not p.author.is_suspended %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-success text-left" href="javascript:void(0)" onclick="post_toast2('/unban_user/{{p.author_id}}','ban2-{{p.id}}','unban2-{{p.id}}')" data-dismiss="modal"><i class="fas fa-user-minus mr-3"></i>Unban user</a></button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -471,7 +471,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v.admin_level >=3 and v.id!=p.author_id %}
|
{% if v.admin_level >=3 and v.id!=p.author_id %}
|
||||||
<li id="ban-{{p.id}}" class="{% if p.author.is_suspended %}d-none{% endif %} list-inline-item"><a class="text-danger" href="javascript:void(0)" data-toggle="modal" data-target="#banModal" onclick="banModal('{{p.permalink}}', '{{ p.author.id }}', '{{p.author.username}}')"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</a></li>
|
<li id="ban-{{p.id}}" class="{% if p.author.is_suspended %}d-none{% endif %} list-inline-item"><a class="text-danger" href="javascript:void(0)" data-toggle="modal" data-target="#banModal" onclick="banModal('/post/{{p.id}}', '{{ p.author.id }}', '{{p.author.username}}')"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</a></li>
|
||||||
<li id="unban-{{p.id}}" class="{% if not p.author.is_suspended %}d-none{% endif %} list-inline-item"><a class="text-danger" id="unexile2-user-{{p.id}}" href="javascript:void(0)" onclick="post_toast2('/unban_user/{{p.author_id}}','ban-{{p.id}}','unban-{{p.id}}')"><i class="fas fa-user-slash"></i>Unban user</a></li>
|
<li id="unban-{{p.id}}" class="{% if not p.author.is_suspended %}d-none{% endif %} list-inline-item"><a class="text-danger" id="unexile2-user-{{p.id}}" href="javascript:void(0)" onclick="post_toast2('/unban_user/{{p.author_id}}','ban-{{p.id}}','unban-{{p.id}}')"><i class="fas fa-user-slash"></i>Unban user</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -208,7 +208,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v.admin_level >=3 and v.id!=p.author_id %}
|
{% if v.admin_level >=3 and v.id!=p.author_id %}
|
||||||
<li id="ban-{{p.id}}" class="{% if p.author.is_suspended %}d-none{% endif %} list-inline-item"><a class="text-danger" id="exile-comment-{{p.id}}" href="javascript:void(0)" data-toggle="modal" data-target="#banModal" onclick="banModal('{{p.permalink}}', '{{ p.author.id }}', '{{p.author.username}}')"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</a></li>
|
<li id="ban-{{p.id}}" class="{% if p.author.is_suspended %}d-none{% endif %} list-inline-item"><a class="text-danger" id="exile-comment-{{p.id}}" href="javascript:void(0)" data-toggle="modal" data-target="#banModal" onclick="banModal('/post/{{p.id}}', '{{ p.author.id }}', '{{p.author.username}}')"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</a></li>
|
||||||
<li id="unban-{{p.id}}" class="{% if not p.author.is_suspended %}d-none{% endif %} list-inline-item"><a class="text-danger" id="unexile2-user-{{p.id}}" href="javascript:void(0)" onclick="post_toast2('/unban_user/{{p.author_id}}','ban-{{p.id}}','unban-{{p.id}}')"><i class="fas fa-user-slash"></i>Unban user</a></li>
|
<li id="unban-{{p.id}}" class="{% if not p.author.is_suspended %}d-none{% endif %} list-inline-item"><a class="text-danger" id="unexile2-user-{{p.id}}" href="javascript:void(0)" onclick="post_toast2('/unban_user/{{p.author_id}}','ban-{{p.id}}','unban-{{p.id}}')"><i class="fas fa-user-slash"></i>Unban user</a></li>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -371,7 +371,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and v.admin_level == 6 and v.id!=p.author_id %}
|
{% if v and v.admin_level == 6 and v.id!=p.author_id %}
|
||||||
<button id="ban2-{{p.id}}" data-dismiss="modal" data-toggle="modal" data-target="#banModal" onclick="banModal('{{p.permalink}}', '{{ p.author.id }}', '{{p.author.username}}')" class="{% if p.author.is_suspended %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-danger text-left" href="javascript:void(0)"><i class="fas fa-user-minus mr-3"></i>Ban user</a></button>
|
<button id="ban2-{{p.id}}" data-dismiss="modal" data-toggle="modal" data-target="#banModal" onclick="banModal('/post/{{p.id}}', '{{ p.author.id }}', '{{p.author.username}}')" class="{% if p.author.is_suspended %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-danger text-left" href="javascript:void(0)"><i class="fas fa-user-minus mr-3"></i>Ban user</a></button>
|
||||||
<button id="unban2-{{p.id}}" class="{% if not p.author.is_suspended %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-success text-left" href="javascript:void(0)" onclick="post_toast2('/unban_user/{{p.author_id}}','ban2-{{p.id}}','unban2-{{p.id}}')" data-dismiss="modal"><i class="fas fa-user-minus mr-3"></i>Unban user</a></button>
|
<button id="unban2-{{p.id}}" class="{% if not p.author.is_suspended %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-success text-left" href="javascript:void(0)" onclick="post_toast2('/unban_user/{{p.author_id}}','ban2-{{p.id}}','unban2-{{p.id}}')" data-dismiss="modal"><i class="fas fa-user-minus mr-3"></i>Unban user</a></button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue