add cw modaction

pull/220/head
G-tix 2023-12-21 20:01:43 +00:00
parent a9bdc40477
commit d730e95cc3
1 changed files with 4 additions and 0 deletions

View File

@ -33,6 +33,10 @@
<button type="button" id="remove2-{{p.id}}" class="{% if p.is_banned %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-danger text-left" data-nonce="{{g.nonce}}" data-onclick="removePost(this,'{{p.id}}','remove2-{{p.id}}','approve2-{{p.id}}','d-none')" data-bs-dismiss="modal"><i class="fas fa-ban text-center mr-2"></i>Remove</button>
<button type="button" id="approve2-{{p.id}}" class="{% if not p.is_banned and request.path != '/admin/reported/posts' %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-success text-left" data-nonce="{{g.nonce}}" data-onclick="approvePost(this,'{{p.id}}','remove2-{{p.id}}','approve2-{{p.id}}','d-none')" data-bs-dismiss="modal"><i class="fas fa-check text-center mr-2"></i>Approve</button>
{% endif %}
{% if FEATURES['CW_MARKING'] and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
<button type="button" id="mark2-{{p.id}}" class="{% if p.cw %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-danger" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/mark_post_cw/{{p.id}}','mark2-{{p.id}}','unmark2-{{p.id}}','d-none')" data-bs-dismiss="modal"><i class="fas fa-eye-evil text-center text-danger mr-2"></i>Mark Child Warning</button>
<button type="button" id="unmark2-{{p.id}}" class="{% if not p.cw %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-success" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/unmark_post_cw/{{p.id}}','mark2-{{p.id}}','unmark2-{{p.id}}','d-none')" data-bs-dismiss="modal"><i class="fas fa-eye-evil text-center text-success mr-2"></i>Unmark Child Warning</button>
{% endif %}
{% if FEATURES['NSFW_MARKING'] and v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
<button type="button" id="mark2-{{p.id}}" class="{% if p.nsfw %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-danger" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/mark_post_nsfw/{{p.id}}','mark2-{{p.id}}','unmark2-{{p.id}}','d-none')" data-bs-dismiss="modal"><i class="fas fa-eye-evil text-center text-danger mr-2"></i>Mark NSFW</button>
<button type="button" id="unmark2-{{p.id}}" class="{% if not p.nsfw %}d-none{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-success" data-nonce="{{g.nonce}}" data-onclick="postToastSwitch(this,'/unmark_post_nsfw/{{p.id}}','mark2-{{p.id}}','unmark2-{{p.id}}','d-none')" data-bs-dismiss="modal"><i class="fas fa-eye-evil text-center text-success mr-2"></i>Unmark NSFW</button>