master
Aevann1 2021-08-21 19:48:25 +02:00
parent e5cfcd8405
commit 694a30f733
5 changed files with 26 additions and 26 deletions

View File

@ -29,7 +29,7 @@
<div class="user-info">
<span class="comment-collapse d-md-none" onclick="collapse_comment('{{c.id}}')"></span>
{% if standalone and c.over_18 %}<span class="badge badge-danger">+18</span> {% endif %}
[{% if c.is_banned %}Removed by admins{% elif c.deleted_utc > 0 %}Deleted by author{% elif c.is_blocking %}You are blocking @{{c.author.username}}{% elif c.is_blocked %}This user has blocked you{% endif %}]
[{% if c.is_suspended %}Removed by admins{% elif c.deleted_utc > 0 %}Deleted by author{% elif c.is_blocking %}You are blocking @{{c.author.username}}{% elif c.is_blocked %}This user has blocked you{% endif %}]
</div>
@ -107,7 +107,7 @@
<div class="comment-body">
<div id="{% if comment_info and comment_info.id == c.id %}context{%else%}comment-{{c.id}}-only{% endif %}" class="{% if comment_info and comment_info.id == c.id %}context{%endif%}{% if c.is_banned %} banned{% endif %}{% if c.deleted_utc %} deleted{% endif %}">
<div id="{% if comment_info and comment_info.id == c.id %}context{%else%}comment-{{c.id}}-only{% endif %}" class="{% if comment_info and comment_info.id == c.id %}context{%endif%}{% if c.is_suspended %} banned{% endif %}{% if c.deleted_utc %} deleted{% endif %}">
<div class="user-info">
<span class="comment-collapse d-md-none" onclick="collapse_comment('{{c.id}}')"></span>
@ -314,7 +314,7 @@
{% endif %}
{% if v and v.admin_level==6 and v.id != c.author_id %}
{% if c.author.is_banned %}
{% if c.author.is_suspended %}
<li class="list-inline-item d-none d-md-inline-block"><a class="text-success" id="unexile-comment-{{c.id}}" href="javascript:void(0)" onclick="post_toast('/unban_user/{{c.author_id}}?toast=1')"><i class="fas fa-user-slash text-success fa-fw"></i>Unban user</a></li>
{% else %}
<li class="list-inline-item d-none d-md-inline-block"><a class="text-danger" id="exile-comment-{{c.id}}" href="javascript:void(0)" onclick="post_toast('/ban_user/{{c.author_id}}/?reason={{c.permalink}}')"><i class="fas fa-user-slash text-danger fa-fw"></i>Ban user</a></li>
@ -473,7 +473,7 @@
{% if v and (c.post and v.admin_level == 6) %}
{% if c.author_id != v.id %}
{% if c.author.is_banned %}
{% if c.author.is_suspended %}
<li class="list-group-item"><a class="text-success d-block" id="unexile-comment2-{{c.id}}" href="javascript:void(0)" onclick="post('/unban_user/{{c.author_id}}', function(){window.location.reload(true);})"><i class="fas fa-user-minus fa-fw text-success"></i>Unban user</a></li>
{% else %}
<li class="list-group-item"><a class="text-danger d-block" id="exile-comment2-{{c.id}}" href="javascript:void(0)" onclick="post('/ban_user/{{c.author_id}}', function(){window.location.reload(true);})"><i class="fas fa-user-minus fa-fw text-danger"></i>Ban user</a></li>

View File

@ -159,7 +159,7 @@
{% endif %}
{% if v and v.admin_level == 6 and v.id!=p.author_id %}
{% if p.author.is_banned %}
{% if p.author.is_suspended %}
<button class="nobackground btn btn-link btn-block btn-lg text-success text-left" href="javascript:void(0)" onclick="post_toast('/unban_user/{{p.author_id}}?toast=1')"><i class="fas fa-user-minus mr-3"></i>Unban user</a></button>
{% else %}
<button class="nobackground btn btn-link btn-block btn-lg text-danger text-left" href="javascript:void(0)" onclick="post_toast('/ban_user/{{p.author_id}}?toast=1')"><i class="fas fa-user-minus mr-3"></i>Ban user</a></button>
@ -194,7 +194,7 @@
<div class="col-12">
<div id="post-{{p.id}}" class="card border-0 mt-3{% if p.is_banned %} banned{% endif %}{% if p.stickied %} stickied{% endif %}{% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}">
<div id="post-{{p.id}}" class="card border-0 mt-3{% if p.is_suspended %} banned{% endif %}{% if p.stickied %} stickied{% endif %}{% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}">
<div class="{% if p.deleted_utc > 0 %}deleted {% endif %}d-flex flex-row-reverse flex-nowrap justify-content-end">
{% if p.thumb_url and not p.embed_url %}
@ -291,7 +291,7 @@
</div>
{% if v and v.id==p.author_id and not v.is_banned %}
{% if v and v.id==p.author_id and not v.is_suspended %}
<div id="edit-post-body-{{p.id}}" class="d-none comment-write collapsed child">
<form id="post-edit-form-{{p.id}}" class="d-flex flex-column" action="/edit_post/{{p.id}}" method="post" class="input-group">
<input type="hidden" name="formkey" value="{{v.formkey}}">
@ -404,7 +404,7 @@
{% endif %}
{% if v.admin_level >=3 and v.id!=p.author_id %}
{% if p.author.is_banned %}
{% if p.author.is_suspended %}
<li class="list-inline-item"><a class="text-success" href="javascript:void(0)" onclick="post_toast('/unban_user/{{p.author_id}}')"
><i class="fas fa-user-slash text-success"></i>Unban user</a></li>
{% else %}
@ -437,7 +437,7 @@
<div id="voting" class="voting d-none d-md-block mb-auto">
<div id="post-{{p.id}}-up" tabindex="0" class="arrow-up mx-auto" onclick="location.href='/login?redirect={{request.path | urlencode}}';">
</div>
<span id="post-{{p.id}}-score-none" class="score text-muted"{% if not p.is_banned %} data-toggle="tooltip" data-placement="right" data-original-title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
<span id="post-{{p.id}}-score-none" class="score text-muted"{% if not p.is_suspended %} data-toggle="tooltip" data-placement="right" data-original-title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
<div id="post-{{p.id}}-down" tabindex="0" class="arrow-down mx-auto" onclick="location.href='/login?redirect={{request.path | urlencode}}';">
</div>
</div>
@ -571,7 +571,7 @@
</form>
</div>
{% if not v and not p.is_banned %}
{% if not v and not p.is_suspended %}
<div class="comment-write mb-3">
<textarea class="comment-box form-control rounded" name="body" aria-label="With textarea" placeholder="Add your comment..." rows="3" onclick="location.href='/login?redirect={{request.path | urlencode}}';"></textarea>
</div>

View File

@ -11,7 +11,7 @@
{% block title %}
<title>{{p.realtitle(v)}}</title>
{% if p.is_banned %}
{% if p.is_suspended %}
<meta name="description" content="[removed by admins]">
{% else %}
<meta name="description" content="[deleted by user]">
@ -32,7 +32,7 @@
</form>
{% endif %}
{% if v.admin_level >=1 and v.admin_level > p.author.admin_level %}
{% if p.is_banned %}
{% if p.is_suspended %}
<form action="/unban_post/{{p.id}}" method="post">
<input type="hidden" name="formkey", value="{{v.formkey}}">
<input type="submit" value="Approve Post">
@ -53,10 +53,10 @@
<div class="col-12">
<div id="post-{{p.id}}" class="card d-flex flex-row-reverse flex-nowrap justify-content-end border-0 p-0 {% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}">
<div class="card-block my-md-auto{% if p.is_banned %} banned{% endif %}">
<div class="post-meta text-left d-block d-md-none mb-1">{% if p.over_18 %}<span class="badge badge-danger">+18</span> {% endif %}{% if p.is_banned %}[Removed by admins]{% else %}[Deleted by user]{% endif %}</div>
<div class="card-block my-md-auto{% if p.is_suspended %} banned{% endif %}">
<div class="post-meta text-left d-block d-md-none mb-1">{% if p.over_18 %}<span class="badge badge-danger">+18</span> {% endif %}{% if p.is_suspended %}[Removed by admins]{% else %}[Deleted by user]{% endif %}</div>
<h5 class="card-title post-title text-left mb-0 mb-md-1">{{p.realtitle(v)}}</h5>
<div class="post-meta text-left d-none d-md-block">{% if p.over_18 %}<span class="badge badge-danger">+18</span> {% endif %}{% if p.is_banned %}[Removed by admins]{% else %}[Deleted by user]{% endif %}</div>
<div class="post-meta text-left d-none d-md-block">{% if p.over_18 %}<span class="badge badge-danger">+18</span> {% endif %}{% if p.is_suspended %}[Removed by admins]{% else %}[Deleted by user]{% endif %}</div>
</div>

View File

@ -20,7 +20,7 @@
{% endif %}
<div id="post-{{p.id}}" class="card{% if p.is_banned %} banned{% endif %}{% if p.deleted_utc > 0 %} 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="card{% if p.is_suspended %} banned{% endif %}{% if p.deleted_utc > 0 %} deleted{% endif %}{% if p.stickied %} stickied{% endif %}{% if voted==1 %} upvoted{% elif voted==-1 %} downvoted{% endif %}{% if p.over_18 %} nsfw{% endif %}">
<div class="d-flex flex-row-reverse flex-md-row flex-nowrap justify-content-end">
@ -33,7 +33,7 @@
<div class="mx-auto arrow-up post-{{p.id}}-up active"></div>
{% endif %}
<span id="post-score-{{p.id}}" class="score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}"{% if not p.is_banned %} data-toggle="tooltip" data-placement="right" data-original-title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
<span id="post-score-{{p.id}}" class="score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}"{% if not p.is_suspended %} data-toggle="tooltip" data-placement="right" data-original-title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
{% if voted==-1 %}
<div class="text-muted mx-auto arrow-down post-{{p.id}}-down active"></div>
@ -43,7 +43,7 @@
<div id="post-{{p.id}}-up" tabindex="0" data-id-up="{{p.id}}" data-content-type="post" class="mx-auto arrow-up upvote-button post-{{p.id}}-up {% if voted==1 %}active{% endif %}"></div>
<span id="post-score-{{p.id}}" class="score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}"{% if not p.is_banned %} data-toggle="tooltip" data-placement="right" data-original-title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
<span id="post-score-{{p.id}}" class="score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}"{% if not p.is_suspended %} data-toggle="tooltip" data-placement="right" data-original-title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
<div id="post-{{p.id}}-down" tabindex="0" data-id-down="{{p.id}}" data-content-type="post" class="text-muted mx-auto arrow-down downvote-button post-{{p.id}}-down {% if voted==-1 %}active{% endif %}"></div>
@ -51,7 +51,7 @@
<div id="post-{{p.id}}-up" tabindex="0" class="mx-auto arrow-up" onclick="location.href='/login';"></div>
<span id="post-{{p.id}}-score-none" class="score"{% if not p.is_banned %} data-toggle="tooltip" data-placement="right" data-original-title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
<span id="post-{{p.id}}-score-none" class="score"{% if not p.is_suspended %} data-toggle="tooltip" data-placement="right" data-original-title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
<div id="post-{{p.id}}-down" tabindex="0" class="text-muted mx-auto arrow-down" onclick="location.href='/login';"></div>
@ -201,7 +201,7 @@
{% endif %}
{% if v.admin_level >=3 and v.id!=p.author_id %}
{% if p.author.is_banned %}
{% if p.author.is_suspended %}
<li class="list-inline-item"><a class="text-danger" id="unexile2-user-{{p.id}}" href="javascript:void(0)" onclick="post_toast('/unban_user/{{p.author_id}}')"
><i class="fas fa-user-slash"></i>Unban user</a></li>
{% else %}
@ -248,7 +248,7 @@
</span>
{% endif %}
<span id="post-score-{{p.id}}-mobile" class="score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}"{% if not p.is_banned %} data-toggle="tooltip" data-placement="top" data-original-title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
<span id="post-score-{{p.id}}-mobile" class="score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}"{% if not p.is_suspended %} data-toggle="tooltip" data-placement="top" data-original-title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
{% if voted==-1 %}
<span class="ml-2 my-0 arrow-down post-{{p.id}}-down active">
@ -263,7 +263,7 @@
<span id="post-{{p.id}}-up-mobile" tabindex="0" data-id-up="{{p.id}}" data-content-type="post" class="mr-2 arrow-up upvote-button post-{{p.id}}-up {% if voted==1 %}active{% endif %}">
</span>
<span id="post-score-{{p.id}}-mobile" class="score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}"{% if not p.is_banned %} data-toggle="tooltip" data-placement="top" data-original-title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
<span id="post-score-{{p.id}}-mobile" class="score post-score-{{p.id}} {% if voted==1 %}score-up{% elif voted==-1%}score-down{% endif %}"{% if not p.is_suspended %} data-toggle="tooltip" data-placement="top" data-original-title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
<span id="post-{{p.id}}-down-mobile" tabindex="0" data-id-down="{{p.id}}" data-content-type="post" class="ml-2 my-0 arrow-down downvote-button post-{{p.id}}-down {% if voted==-1 %}active{% endif %}">
</span>
@ -275,7 +275,7 @@
<i class="fas fa-arrow-alt-up mx-0" aria-hidden="true"></i>
</span>
<span id="post-score-{{p.id}}-mobile" class="score"{% if not p.is_banned %} data-toggle="tooltip" data-placement="top" data-original-title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
<span id="post-score-{{p.id}}-mobile" class="score"{% if not p.is_suspended %} data-toggle="tooltip" data-placement="top" data-original-title="+{{ups}} | -{{downs}}"{% endif %}>{{score}}</span>
<span id="arrow-{{p.id}}-mobile-down" tabindex="0" class="arrow-mobile-down ml-2 my-0" onclick="location.href='/login';">
<i class="fas fa-arrow-alt-down mx-0" aria-hidden="true"></i>
@ -361,7 +361,7 @@
{% endif %}
{% if v and v.admin_level == 6 and v.id!=p.author_id %}
{% if p.author.is_banned %}
{% if p.author.is_suspended %}
<button class="nobackground btn btn-link btn-block btn-lg text-success text-left" href="javascript:void(0)" onclick="post_toast('/unban_user/{{p.author_id}}?toast=1')"><i class="fas fa-user-minus mr-3"></i>Unban user</a></button>
{% else %}
<button class="nobackground btn btn-link btn-block btn-lg text-danger text-left" href="javascript:void(0)" onclick="post_toast('/ban_user/{{p.author_id}}?toast=1')"><i class="fas fa-user-minus mr-3"></i>Ban user</a></button>

View File

@ -238,7 +238,7 @@
</div>
<pre></pre>
{% if u.is_banned %}
{% if u.is_suspended %}
<form action="/unban_user/{{u.id}}/" method="post" action="">
<input type="hidden" name="formkey" value="{{v.formkey}}">
<div class="custom-control custom-checkbox">
@ -457,7 +457,7 @@
</div>
<pre></pre>
{% if u.is_banned %}
{% if u.is_suspended %}
<form action="/unban_user/{{u.id}}" method="post">
<input type="hidden" name="formkey", value="{{v.formkey}}">
<br />