forked from MarseyWorld/MarseyWorld
sfdsdf
parent
28b6c0bea0
commit
35d6a06bc8
|
@ -848,8 +848,6 @@ def settings_profilecss(v):
|
|||
@validate_formkey
|
||||
def settings_block_user(v):
|
||||
|
||||
if v and v.admin_level: return {"error": "Admins can't block users."}, 403
|
||||
|
||||
user = get_user(request.values.get("username"), graceful=True)
|
||||
|
||||
if not user: return {"error": "That user doesn't exist."}, 404
|
||||
|
|
|
@ -366,7 +366,7 @@
|
|||
<a id="distinguish-{{c.id}}" class="list-inline-item d-none {% if not c.distinguish_level %}d-md-inline-block{% endif %} text-info" href="javascript:void(0)" onclick="post_toast3('/distinguish_comment/{{c.id}}','distinguish-{{c.id}}','undistinguish-{{c.id}}','yes')"><i class="fas fa-id-badge text-info fa-fw"></i>Distinguish</a>
|
||||
{% endif %}
|
||||
|
||||
{% if v and not v.id==c.author_id and not v.admin_level %}
|
||||
{% if v and not v.id==c.author_id %}
|
||||
<a id="unblock-{{c.id}}" class="text-success {% if c.is_blocking %}d-md-inline-block{% endif %} list-inline-item d-none" href="javascript:void(0)" onclick="post_toast3('/settings/unblock?username={{c.author.username}}','block-{{c.id}}','unblock-{{c.id}}')"><i class="fas fa-eye-slash fa-fw text-success"></i>Unblock user</a>
|
||||
|
||||
<a id="prompt-{{c.id}}" class="blockuser list-inline-item d-none text-danger" href="javascript:void(0)" onclick="post_toast3('/settings/block?username={{c.author.username}}','prompt-{{c.id}}','unblock-{{c.id}}')"><i class="fas fa-eye-slash fa-fw text-danger"></i>Are you sure?</a>
|
||||
|
@ -556,7 +556,7 @@
|
|||
<a href="{{c.oauth_app.permalink}}/comments" class="list-group-item text-info" ><i class="fas fa-code text-info"></i>API App</a>
|
||||
{% endif %}
|
||||
|
||||
{% if not v.id==c.author_id and not v.admin_level %}
|
||||
{% if not v.id==c.author_id %}
|
||||
<a id="unblock2-{{c.id}}" data-bs-dismiss="modal" class="text-success list-group-item {% if not c.is_blocking %}d-none{% endif %}" href="javascript:void(0)" onclick="post_toast2('/settings/unblock?username={{c.author.username}}','block2-{{c.id}}','unblock2-{{c.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-slash text-success"></i>Unblock user</a>
|
||||
|
||||
<a id="prompt2-{{c.id}}" data-bs-dismiss="modal" class="blockuser list-group-item d-none text-danger" href="javascript:void(0)" onclick="post_toast2('/settings/block?username={{c.author.username}}','prompt2-{{c.id}}','unblock2-{{c.id}}')"><i class="fas fa-eye-slash fa-fw text-danger"></i>Are you sure?</a>
|
||||
|
|
|
@ -247,7 +247,7 @@
|
|||
|
||||
{% endif %}
|
||||
|
||||
{% if v and v.id != p.author_id and not v.admin_level %}
|
||||
{% if v and v.id != p.author_id %}
|
||||
<button id="unblock2-{{p.id}}" class="nobackground btn btn-link btn-block btn-lg text-success text-left{% if not p.is_blocking %} d-none{% endif %}" data-bs-dismiss="modal" onclick="post_toast2('/settings/unblock?username={{p.author.username}}','block2-{{p.id}}','unblock2-{{p.id}}')"><i class="fas fa-eye mr-3 text-success"></i>Unblock user</button>
|
||||
|
||||
<button id="prompt2-{{p.id}}" class="blockuser nobackground btn btn-link btn-block btn-lg text-danger text-left d-none" data-bs-dismiss="modal" onclick="post_toast2('/settings/block?username={{p.author.username}}','prompt2-{{p.id}}','unblock2-{{p.id}}')"><i class="fas fa-eye-slash mr-3 text-danger"></i>Are you sure?</button>
|
||||
|
@ -567,7 +567,7 @@
|
|||
<a class="list-inline-item" href="{{p.oauth_app.permalink}}" ><i class="fas fa-code"></i>API App</a>
|
||||
{% endif %}
|
||||
|
||||
{% if not v.id==p.author_id and not v.admin_level %}
|
||||
{% if not v.id==p.author_id %}
|
||||
<a id="unblock-{{p.id}}" class="text-success list-inline-item {% if not p.is_blocking %} d-none{% endif %}" href="javascript:void(0)" onclick="post_toast2('/settings/unblock?username={{p.author.username}}','block-{{p.id}}','unblock-{{p.id}}')"><i class="fas fa-eye text-success"></i>Unblock user</a>
|
||||
|
||||
<a id="prompt-{{p.id}}" class="text-danger blockuser list-inline-item d-none" href="javascript:void(0)" onclick="post_toast2('/settings/block?username={{p.author.username}}','prompt-{{p.id}}','unblock-{{p.id}}')"><i class="fas fa-eye-slash text-danger"></i>Are you sure?</a>
|
||||
|
|
|
@ -270,7 +270,7 @@
|
|||
<a class="list-inline-item" href="{{p.oauth_app.permalink}}" ><i class="fas fa-code"></i>API App</a>
|
||||
{% endif %}
|
||||
|
||||
{% if not v.id==p.author_id and not v.admin_level %}
|
||||
{% if not v.id==p.author_id %}
|
||||
<a id="unblock-{{p.id}}" class="text-success list-inline-item {% if not p.is_blocking %} d-none{% endif %}" href="javascript:void(0)" onclick="post_toast2('/settings/unblock?username={{p.author.username}}','block-{{p.id}}','unblock-{{p.id}}')"><i class="fas fa-eye text-success"></i>Unblock user</a>
|
||||
|
||||
<a id="prompt-{{p.id}}" class="text-danger blockuser list-inline-item d-none" href="javascript:void(0)" onclick="post_toast2('/settings/block?username={{p.author.username}}','prompt-{{p.id}}','unblock-{{p.id}}')"><i class="fas fa-eye-slash text-danger"></i>Are you sure?</a>
|
||||
|
@ -434,7 +434,7 @@
|
|||
|
||||
{% endif %}
|
||||
|
||||
{% if v and v.id != p.author_id and not v.admin_level %}
|
||||
{% if v and v.id != p.author_id %}
|
||||
<button id="unblock2-{{p.id}}" class="nobackground btn btn-link btn-block btn-lg text-success text-left{% if not p.is_blocking %} d-none{% endif %}" data-bs-dismiss="modal" onclick="post_toast2('/settings/unblock?username={{p.author.username}}','block2-{{p.id}}','unblock2-{{p.id}}')"><i class="fas fa-eye mr-3 text-success"></i>Unblock user</button>
|
||||
|
||||
<button id="prompt2-{{p.id}}" class="blockuser nobackground btn btn-link btn-block btn-lg text-danger text-left d-none" data-bs-dismiss="modal" onclick="post_toast2('/settings/block?username={{p.author.username}}','prompt2-{{p.id}}','unblock2-{{p.id}}')"><i class="fas fa-eye-slash mr-3 text-danger"></i>Are you sure?</button>
|
||||
|
|
Loading…
Reference in New Issue