show bannedfor and chuddedfor in chudrama

pull/218/head
Aevann 2023-11-20 22:31:10 +02:00
parent 77bb4af171
commit beaac90782
3 changed files with 13 additions and 4 deletions

View File

@ -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:

View File

@ -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 %}

View File

@ -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 %}