show bannedfor and chuddedfor in chudrama
parent
77bb4af171
commit
beaac90782
|
@ -188,6 +188,15 @@ def move_post(post, v, reason):
|
|||
|
||||
post.hole = hole_to
|
||||
post.hole_pinned = None
|
||||
|
||||
if hole_to == 'chudrama':
|
||||
post.bannedfor = None
|
||||
post.chuddedfor = None
|
||||
for c in post.comments:
|
||||
c.bannedfor = None
|
||||
c.chuddedfor = None
|
||||
g.db.add(c)
|
||||
|
||||
g.db.add(post)
|
||||
|
||||
if v.id != post.author_id:
|
||||
|
|
|
@ -129,11 +129,11 @@
|
|||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% if c.bannedfor and not (c.parent_post and c.post.hole == 'chudrama') %}
|
||||
{% if c.bannedfor %}
|
||||
<i class="fas fa-hammer-crash text-danger" data-bs-toggle="tooltip" data-bs-placement="bottom" title="User was banned for this comment {{c.bannedfor}}"></i>
|
||||
{% endif %}
|
||||
|
||||
{% if c.chuddedfor and not (c.parent_post and c.post.hole == 'chudrama') %}
|
||||
{% if c.chuddedfor %}
|
||||
<i class="fas fa-face-sleeping text-danger mr-1" data-bs-toggle="tooltip" data-bs-placement="bottom" title="User was chudded for this comment {{c.chuddedfor}}"></i>
|
||||
{% endif %}
|
||||
|
||||
|
|
|
@ -21,11 +21,11 @@
|
|||
<a><i class="fas fa-campfire text-danger" data-bs-toggle="tooltip" data-bs-placement="bottom" title="User has been exiled from /h/{{p.hole}} by @{{p.author.exiler_username(p.hole)}}"></i></a>
|
||||
{% endif %}
|
||||
|
||||
{% if p.bannedfor and p.hole != 'chudrama' %}
|
||||
{% if p.bannedfor %}
|
||||
<i class="fas fa-hammer-crash text-danger" data-bs-toggle="tooltip" data-bs-placement="bottom" title="User was banned for this post {{p.bannedfor}}"></i>
|
||||
{% endif %}
|
||||
|
||||
{% if p.chuddedfor and p.hole != 'chudrama' %}
|
||||
{% if p.chuddedfor %}
|
||||
<i class="fas fa-face-sleeping text-danger mr-1" data-bs-toggle="tooltip" data-bs-placement="bottom" title="User was chudded for this post {{p.chuddedfor}}"></i>
|
||||
{% endif %}
|
||||
|
||||
|
|
Loading…
Reference in New Issue