forked from rDrama/rDrama
same as last comit
parent
4c14e10cf4
commit
814bf0a5f3
|
@ -29,6 +29,12 @@ class Flag(Base):
|
||||||
def realreason(self, v):
|
def realreason(self, v):
|
||||||
return censor_slurs(self.reason, v)
|
return censor_slurs(self.reason, v)
|
||||||
|
|
||||||
|
#lazy hack to avoid having to rename the comment_id column and causing potential new bugs
|
||||||
|
@property
|
||||||
|
@lazy
|
||||||
|
def parent_id(self):
|
||||||
|
return self.post_id
|
||||||
|
|
||||||
|
|
||||||
class CommentFlag(Base):
|
class CommentFlag(Base):
|
||||||
__tablename__ = "commentflags"
|
__tablename__ = "commentflags"
|
||||||
|
@ -50,3 +56,9 @@ class CommentFlag(Base):
|
||||||
@lazy
|
@lazy
|
||||||
def realreason(self, v):
|
def realreason(self, v):
|
||||||
return censor_slurs(self.reason, v)
|
return censor_slurs(self.reason, v)
|
||||||
|
|
||||||
|
#lazy hack to avoid having to rename the comment_id column and causing potential new bugs
|
||||||
|
@property
|
||||||
|
@lazy
|
||||||
|
def parent_id(self):
|
||||||
|
return self.comment_id
|
||||||
|
|
|
@ -235,7 +235,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{macros.flags(c)}}
|
{{macros.flags(c, 'comment')}}
|
||||||
|
|
||||||
{% if c.is_banned and c.ban_reason %}
|
{% if c.is_banned and c.ban_reason %}
|
||||||
<div id="comment-banned-warning" class="comment-text text-removed mb-0">removed by @{{c.ban_reason}} (Admin)</div>
|
<div id="comment-banned-warning" class="comment-text text-removed mb-0">removed by @{{c.ban_reason}} (Admin)</div>
|
||||||
|
|
|
@ -77,7 +77,7 @@
|
||||||
{{macros.post_meta(p)}}
|
{{macros.post_meta(p)}}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{macros.flags(p)}}
|
{{macros.flags(p, 'post')}}
|
||||||
|
|
||||||
{% if p.realurl(v) and not v_forbid_deleted %}
|
{% if p.realurl(v) and not v_forbid_deleted %}
|
||||||
<h1 id="post-title" class="card-title post-title text-left mb-md-3 {% if p.author.agendaposter and p.sub != 'chudrama' %}text-uppercase{% endif %}">
|
<h1 id="post-title" class="card-title post-title text-left mb-md-3 {% if p.author.agendaposter and p.sub != 'chudrama' %}text-uppercase{% endif %}">
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
|
|
||||||
{% set v_forbid_deleted = (p.deleted_utc != 0 or p.is_banned) and not (v and v.admin_level >= PERMS['POST_COMMENT_MODERATION']) and not (v and v.id == p.author_id) %}
|
{% set v_forbid_deleted = (p.deleted_utc != 0 or p.is_banned) and not (v and v.admin_level >= PERMS['POST_COMMENT_MODERATION']) and not (v and v.id == p.author_id) %}
|
||||||
|
|
||||||
{{macros.flags(p)}}
|
{{macros.flags(p, 'post')}}
|
||||||
|
|
||||||
<div id="post-{{p.id}}" class="actual-post {% if p.ghost %}ghost-post{% endif %} {% if p.unread %}unread{% else %}card{% endif %} {% if p.is_banned %} banned{% endif %}{% if p.deleted_utc %} deleted{% endif %}{% if p.stickied %} stickied{% endif %}{% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}{% if p.over_18 %} nsfw{% endif %}">
|
<div id="post-{{p.id}}" class="actual-post {% if p.ghost %}ghost-post{% endif %} {% if p.unread %}unread{% else %}card{% endif %} {% if p.is_banned %} banned{% endif %}{% if p.deleted_utc %} deleted{% endif %}{% if p.stickied %} stickied{% endif %}{% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}{% if p.over_18 %} nsfw{% endif %}">
|
||||||
|
|
||||||
|
|
|
@ -197,7 +197,7 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endmacro %}
|
{% endmacro %}
|
||||||
|
|
||||||
{% macro flags(i) %}
|
{% macro flags(i, kind) %}
|
||||||
{% if i.active_flags(v) %}
|
{% if i.active_flags(v) %}
|
||||||
<div id="flaggers-{{i.id}}" class="flaggers d-none">
|
<div id="flaggers-{{i.id}}" class="flaggers d-none">
|
||||||
<strong><i class="far fa-fw fa-flag"></i> Reported by:</strong>
|
<strong><i class="far fa-fw fa-flag"></i> Reported by:</strong>
|
||||||
|
@ -210,7 +210,7 @@
|
||||||
<a style="font-weight:bold" href="{{f.user.url}}">{{f.user.username}}</a>
|
<a style="font-weight:bold" href="{{f.user.url}}">{{f.user.username}}</a>
|
||||||
{% if f.reason %}: {{f.realreason(v) | safe}}{% endif %}
|
{% if f.reason %}: {{f.realreason(v) | safe}}{% endif %}
|
||||||
{% if v and v.admin_level >= PERMS['FLAGS_REMOVE'] %}
|
{% if v and v.admin_level >= PERMS['FLAGS_REMOVE'] %}
|
||||||
<button type="button" data-nonce="{{g.nonce}}" data-onclick="delReport(this,'/del_report/comment/{{f.comment_id}}/{{f.user_id}}')">[remove]</button>
|
<button type="button" data-nonce="{{g.nonce}}" data-onclick="delReport(this,'/del_report/{{kind}}/{{f.parent_id}}/{{f.user_id}}')">[remove]</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
Loading…
Reference in New Issue