forked from rDrama/rDrama
1
0
Fork 0

same as last commit

master
Aevann1 2022-10-23 18:07:34 +02:00
parent eafbebbdf1
commit 25e50be552
2 changed files with 8 additions and 8 deletions

View File

@ -1,7 +1,7 @@
function removeComment(post_id,button1,button2,cls) {
function removeComment(t,post_id,button1,button2,cls) {
url="/remove_comment/"+post_id
post(url)
post_toast(t,url)
if (window.location.pathname == '/admin/reported/comments')
{
@ -20,10 +20,10 @@ function removeComment(post_id,button1,button2,cls) {
}
};
function approveComment(post_id,button1,button2,cls) {
function approveComment(t,post_id,button1,button2,cls) {
url="/approve_comment/"+post_id
post(url)
post_toast(t,url)
if (window.location.pathname == '/admin/reported/comments')
{

View File

@ -459,10 +459,10 @@
{% if v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
<button id="approve-{{c.id}}" class="dropdown-item list-inline-item d-none {% if c.is_banned or request.path == '/admin/reported/comments' %}d-md-block{% endif %} text-success" onclick="approveComment('{{c.id}}','approve-{{c.id}}','remove-{{c.id}}','d-md-block')"><i class="fas fa-check text-success fa-fw"></i>Approve</button>
<button id="approve-{{c.id}}" class="dropdown-item list-inline-item d-none {% if c.is_banned or request.path == '/admin/reported/comments' %}d-md-block{% endif %} text-success" onclick="approveComment(this,'{{c.id}}','approve-{{c.id}}','remove-{{c.id}}','d-md-block')"><i class="fas fa-check text-success fa-fw"></i>Approve</button>
{% if v.id != c.author.id %}
<button id="remove-{{c.id}}" class="dropdown-item list-inline-item d-none {% if not c.is_banned %}d-md-block{% endif %} text-danger" onclick="removeComment('{{c.id}}','approve-{{c.id}}','remove-{{c.id}}','d-md-block')"><i class="fas fa-ban text-danger fa-fw"></i>Remove</button>
<button id="remove-{{c.id}}" class="dropdown-item list-inline-item d-none {% if not c.is_banned %}d-md-block{% endif %} text-danger" onclick="removeComment(this,'{{c.id}}','approve-{{c.id}}','remove-{{c.id}}','d-md-block')"><i class="fas fa-ban text-danger fa-fw"></i>Remove</button>
{% endif %}
{% endif %}
@ -707,10 +707,10 @@
{% endif %}
{% if v.admin_level >= PERMS['POST_COMMENT_MODERATION'] %}
{% if v.id != c.author.id %}
<a id="remove2-{{c.id}}" class="{% if c.is_banned %}d-none{% endif %} list-group-item text-danger" role="button" onclick="removeComment('{{c.id}}','approve2-{{c.id}}','remove2-{{c.id}}','d-none')" data-bs-dismiss="modal"><i class="fas fa-ban text-danger mr-2"></i>Remove</a>
<a id="remove2-{{c.id}}" class="{% if c.is_banned %}d-none{% endif %} list-group-item text-danger" role="button" onclick="removeComment(this,'{{c.id}}','approve2-{{c.id}}','remove2-{{c.id}}','d-none')" data-bs-dismiss="modal"><i class="fas fa-ban text-danger mr-2"></i>Remove</a>
{% endif %}
<a id="approve2-{{c.id}}" class="{% if not c.is_banned or request.path == '/admin/reported/comments' %}d-none{% endif %} list-group-item text-success" role="button" onclick="approveComment('{{c.id}}','approve2-{{c.id}}','remove2-{{c.id}}','d-none')" data-bs-dismiss="modal"><i class="fas fa-check text-success mr-2"></i>Approve</a>
<a id="approve2-{{c.id}}" class="{% if not c.is_banned and request.path != '/admin/reported/comments' %}d-none{% endif %} list-group-item text-success" role="button" onclick="approveComment(this,'{{c.id}}','approve2-{{c.id}}','remove2-{{c.id}}','d-none')" data-bs-dismiss="modal"><i class="fas fa-check text-success mr-2"></i>Approve</a>
{% endif %}
{% if c.oauth_app and v.admin_level >= PERMS['APPS_MODERATION'] %}