forked from rDrama/rDrama
master
parent
5c1e1df91e
commit
9a461bc9a5
|
@ -171,7 +171,8 @@ def badge_grant_post(v):
|
||||||
if url: new_badge.url = url
|
if url: new_badge.url = url
|
||||||
|
|
||||||
g.db.add(new_badge)
|
g.db.add(new_badge)
|
||||||
|
g.db.flush()
|
||||||
|
|
||||||
text = f"""
|
text = f"""
|
||||||
@{v.username} has given you the following profile badge:
|
@{v.username} has given you the following profile badge:
|
||||||
\n\n![]({new_badge.path})
|
\n\n![]({new_badge.path})
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
{% extends "default.html" %}
|
|
||||||
|
|
||||||
{% block title %}
|
|
||||||
<title>401 Not Authorized</title>
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
{% block pagetype %}error-401{% endblock %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
<div class="row justify-content-center">
|
|
||||||
<div class="col-10 col-md-5">
|
|
||||||
<div class="text-center px-3 my-8">
|
|
||||||
<i class="fad fa-ban text-muted mb-5" style="font-size: 5rem;"></i>
|
|
||||||
<h1 class="h5">401 Not Authorized</h1>
|
|
||||||
<p class="text-muted">You have 0 ban awards (they're a patron perk):</p>
|
|
||||||
<a href="https://rdrama.gumroad.com/l/tfcvri">https://rdrama.gumroad.com/l/tfcvri</a>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
{% endblock %}
|
|
|
@ -101,7 +101,7 @@
|
||||||
<a class="dropdown-item" href="/changelog"><i class="fas fa-clipboard fa-fw text-left mr-3"></i>Changelog</a>
|
<a class="dropdown-item" href="/changelog"><i class="fas fa-clipboard fa-fw text-left mr-3"></i>Changelog</a>
|
||||||
<a class="dropdown-item" href="https://github.com/Aevann1/{{"SITE_NAME" | app_config}}"><i class="fab fa-github fa-fw text-left mr-3"></i>Source code</a>
|
<a class="dropdown-item" href="https://github.com/Aevann1/{{"SITE_NAME" | app_config}}"><i class="fab fa-github fa-fw text-left mr-3"></i>Source code</a>
|
||||||
<a class="dropdown-item" href="/discord"><i class="fab fa-discord fa-fw text-left mr-3"></i>Discord</a>
|
<a class="dropdown-item" href="/discord"><i class="fab fa-discord fa-fw text-left mr-3"></i>Discord</a>
|
||||||
<a class="dropdown-item" href="https://rdrama.gumroad.com/l/tfcvri"><i class="fas fa-dollar-sign fa-fw text-left mr-3"></i>Gumroad</a>
|
<a class="dropdown-item" href="https://rdrama.gumroad.com/l/tfcvri"><i class="fas fa-dollar-sign fa-fw text-left mr-3"></i>Donate</a>
|
||||||
<a class="dropdown-item" href="/archives"><i class="fas fa-book fa-fw text-left mr-3"></i>Subreddit Archives</a>
|
<a class="dropdown-item" href="/archives"><i class="fas fa-book fa-fw text-left mr-3"></i>Subreddit Archives</a>
|
||||||
<a class="dropdown-item" href="/contact"><i class="fas fa-file-signature fa-fw text-left mr-3"></i>Contact us</a>
|
<a class="dropdown-item" href="/contact"><i class="fas fa-file-signature fa-fw text-left mr-3"></i>Contact us</a>
|
||||||
</div>
|
</div>
|
||||||
|
@ -156,7 +156,7 @@
|
||||||
<li class="nav-item"><a class="nav-link" href="/post/1xq/posting-guidelines-policies-legal-shit"><i class="fas fa-balance-scale fa-fw mr-3"></i>Rules</a></li>
|
<li class="nav-item"><a class="nav-link" href="/post/1xq/posting-guidelines-policies-legal-shit"><i class="fas fa-balance-scale fa-fw mr-3"></i>Rules</a></li>
|
||||||
<li class="nav-item"><a class="nav-link" href="https://github.com/Aevann1/{{"SITE_NAME" | app_config}}"><i class="fab fa-github fa-fw mr-3"></i>Source code</a></li>
|
<li class="nav-item"><a class="nav-link" href="https://github.com/Aevann1/{{"SITE_NAME" | app_config}}"><i class="fab fa-github fa-fw mr-3"></i>Source code</a></li>
|
||||||
<li class="nav-item"><a class="nav-link" href="/discord"><i class="fab fa-discord fa-fw mr-3"></i>Discord</a></li>
|
<li class="nav-item"><a class="nav-link" href="/discord"><i class="fab fa-discord fa-fw mr-3"></i>Discord</a></li>
|
||||||
<li class="nav-item"><a class="nav-link" href="https://rdrama.gumroad.com/l/tfcvri"><i class="fas fa-dollar-sign fa-fw mr-3"></i>Gumroad</a></li>
|
<li class="nav-item"><a class="nav-link" href="https://rdrama.gumroad.com/l/tfcvri"><i class="fas fa-dollar-sign fa-fw mr-3"></i>Donate</a></li>
|
||||||
<li class="nav-item"><a class="nav-link" href="/archives"><i class="fas fa-book fa-fw mr-3"></i>Subreddit Archives</a></li>
|
<li class="nav-item"><a class="nav-link" href="/archives"><i class="fas fa-book fa-fw mr-3"></i>Subreddit Archives</a></li>
|
||||||
<li class="nav-item"><a class="nav-link" href="/contact"><i class="fas fa-file-signature fa-fw mr-3"></i>Contact us</a></li>
|
<li class="nav-item"><a class="nav-link" href="/contact"><i class="fas fa-file-signature fa-fw mr-3"></i>Contact us</a></li>
|
||||||
|
|
||||||
|
|
|
@ -98,15 +98,15 @@
|
||||||
<button class="btn btn-link btn-block btn-lg text-left text-muted" data-toggle="modal" data-dismiss="modal" data-target="#reportPostModal" onclick="report_postModal('{{p.id}}','{{'@'+p.author.username}}')" class="d-block"><i class="far fa-flag text-center text-muted mr-3"></i>Report</button>
|
<button class="btn btn-link btn-block btn-lg text-left text-muted" data-toggle="modal" data-dismiss="modal" data-target="#reportPostModal" onclick="report_postModal('{{p.id}}','{{'@'+p.author.username}}')" class="d-block"><i class="far fa-flag text-center text-muted mr-3"></i>Report</button>
|
||||||
{% if v and v.id==p.author_id %}
|
{% if v and v.id==p.author_id %}
|
||||||
{% if p.private %}
|
{% if p.private %}
|
||||||
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="javascript:void(0)" onclick="post_toast('/publish/{{p.id}}')"><i class="fas fa-globe text-center text-muted mr-3"></i>Publish</a></button>
|
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="javascript:void(0)" onclick="post('/publish/{{p.id}}', function(){window.location.reload(true);})"><i class="fas fa-globe text-center text-muted mr-3"></i>Publish</a></button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<button class="btn btn-link btn-block btn-lg text-left text-muted" data-dismiss="modal" onclick="togglePostEdit('{{p.id}}')"><i class="far fa-edit text-center text-muted mr-3"></i>Edit</button>
|
<button class="btn btn-link btn-block btn-lg text-left text-muted" data-dismiss="modal" onclick="togglePostEdit('{{p.id}}')"><i class="far fa-edit text-center text-muted mr-3"></i>Edit</button>
|
||||||
|
|
||||||
<button class="btn btn-link btn-block btn-lg text-muted text-left" id="pin-post-{{p.id}}" href="javascript:void(0)" onclick="post_toast('/pin/{{p.id}}')"><i class="fas fa-thumbtack text-center mr-3"></i>{% if p.is_pinned %}Unpin from your profile{% else %}Pin to your profile{% endif %}</button>
|
<button class="btn btn-link btn-block btn-lg text-muted text-left" id="pin-post-{{p.id}}" href="javascript:void(0)" onclick="post('/pin/{{p.id}}',callback=function(){window.location.reload(true);})"><i class="fas fa-thumbtack text-center mr-3"></i>{% if p.is_pinned %}Unpin from your profile{% else %}Pin to your profile{% endif %}</button>
|
||||||
|
|
||||||
{% if p.deleted_utc > 0 %}
|
{% if p.deleted_utc > 0 %}
|
||||||
<button class="btn btn-link btn-block btn-lg text-left text-muted" href="javascript:void(0)" onclick="post_toast('/undelete_post/{{p.id}}')"><i class="far fa-trash-alt text-center text-muted mr-3"></i>Undelete</button>
|
<button class="btn btn-link btn-block btn-lg text-left text-muted" href="javascript:void(0)" onclick="post('/undelete_post/{{p.id}}', function(){window.location.reload(true);})"><i class="far fa-trash-alt text-center text-muted mr-3"></i>Undelete</button>
|
||||||
{% else %}
|
{% else %}
|
||||||
<button class="btn btn-link btn-block btn-lg text-left text-muted" data-toggle="modal" data-dismiss="modal" data-target="#deletePostModal" onclick="delete_postModal('{{p.id}}')"><i class="far fa-trash-alt text-center text-muted mr-3"></i>Delete</button>
|
<button class="btn btn-link btn-block btn-lg text-left text-muted" data-toggle="modal" data-dismiss="modal" data-target="#deletePostModal" onclick="delete_postModal('{{p.id}}')"><i class="far fa-trash-alt text-center text-muted mr-3"></i>Delete</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -119,26 +119,26 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and p.id in v.subscribed_idlist() %}
|
{% if v and p.id in v.subscribed_idlist() %}
|
||||||
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="javascript:void(0)" onclick="post_toast('/unsubscribe/{{p.id}}')"><i class="fas fa-eye-slash text-center text-muted mr-3"></i>Unsubscribe</a></button>
|
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="javascript:void(0)" onclick="post('/unsubscribe/{{p.id}}', function(){window.location.reload(true);})"><i class="fas fa-eye-slash text-center text-muted mr-3"></i>Unsubscribe</a></button>
|
||||||
{% elif v %}
|
{% elif v %}
|
||||||
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="javascript:void(0)" onclick="post_toast('/subscribe/{{p.id}}')"><i class="fas fa-eye text-center text-muted mr-3"></i>Subscribe</a></button>
|
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="javascript:void(0)" onclick="post('/subscribe/{{p.id}}', function(){window.location.reload(true);})"><i class="fas fa-eye text-center text-muted mr-3"></i>Subscribe</a></button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and p.id in v.saved_idlist() %}
|
{% if v and p.id in v.saved_idlist() %}
|
||||||
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="javascript:void(0)" onclick="post_toast('/unsave_post/{{p.id}}')"><i class="fas fa-save text-center text-muted mr-3"></i>Unsave</a></button>
|
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="javascript:void(0)" onclick="post('/unsave_post/{{p.id}}', function(){window.location.reload(true);})"><i class="fas fa-save text-center text-muted mr-3"></i>Unsave</a></button>
|
||||||
{% elif v %}
|
{% elif v %}
|
||||||
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="javascript:void(0)" onclick="post_toast('/save_post/{{p.id}}')"><i class="fas fa-save text-center text-muted mr-3"></i>Save</a></button>
|
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="javascript:void(0)" onclick="post('/save_post/{{p.id}}', function(){window.location.reload(true);})"><i class="fas fa-save text-center text-muted mr-3"></i>Save</a></button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
{% if v.admin_level >=3 %}
|
{% if v.admin_level >=3 %}
|
||||||
<button class="btn btn-link btn-block btn-lg text-left" id="sticky-post-{{p.id}}" href="javascript:void(0)" onclick="post_toast('/sticky/{{p.id}}')"><i class="fas fa-thumbtack text-center mr-3"></i>{% if p.stickied %}Unpin{% else %}Pin{% endif %}</button>
|
<button class="btn btn-link btn-block btn-lg text-left" id="sticky-post-{{p.id}}" href="javascript:void(0)" onclick="post('/sticky/{{p.id}}',callback=function(){window.location.reload(true);})"><i class="fas fa-thumbtack text-center mr-3"></i>{% if p.stickied %}Unpin{% else %}Pin{% endif %}</button>
|
||||||
{% if v==p.author %}
|
{% if v==p.author %}
|
||||||
<button class="btn btn-link btn-block btn-lg text-left" id="distinguish-post-{{p.id}}" href="javascript:void(0)" onclick="post_toast('/distinguish/{{p.id}}')"><i class="fas fa-crown text-center mr-3"></i>Distinguish</button>
|
<button class="btn btn-link btn-block btn-lg text-left" id="distinguish-post-{{p.id}}" href="javascript:void(0)" onclick="post('/distinguish/{{p.id}}',callback=function(){window.location.reload(true);})"><i class="fas fa-crown text-center mr-3"></i>Distinguish</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
<button class="btn btn-link btn-block btn-lg text-success text-left" id="moderate-post-{{p.id}}" href="javascript:void(0)" onclick="post_toast('/unban_post/{{p.id}}')"><i class="far fa-check text-center mr-3"></i>Approve</button>
|
<button class="btn btn-link btn-block btn-lg text-success text-left" id="moderate-post-{{p.id}}" href="javascript:void(0)" onclick="post('/unban_post/{{p.id}}',callback=function(){window.location.reload(true);})"><i class="far fa-check text-center mr-3"></i>Approve</button>
|
||||||
<button class="btn btn-link btn-block btn-lg text-danger text-left" id="moderate-post-{{p.id}}" href="javascript:void(0)" onclick="post_toast('/ban_post/{{p.id}}')"><i class="far fa-ban text-center mr-3"></i>Remove</button>
|
<button class="btn btn-link btn-block btn-lg text-danger text-left" id="moderate-post-{{p.id}}" href="javascript:void(0)" onclick="post('/ban_post/{{p.id}}',callback=function(){window.location.reload(true);})"><i class="far fa-ban text-center mr-3"></i>Remove</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v.admin_level >=4 and p.oauth_app %}
|
{% if v.admin_level >=4 and p.oauth_app %}
|
||||||
|
@ -155,14 +155,14 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and (v.id==p.author_id or v.admin_level>=3) %}
|
{% if v and (v.id==p.author_id or v.admin_level>=3) %}
|
||||||
<button class="btn btn-link btn-block btn-lg text-left text-danger" onclick="post_toast('/toggle_post_nsfw/{{p.id}}')"><i class="far fa-eye-evil text-center text-danger mr-3"></i>Toggle +18</button>
|
<button class="btn btn-link btn-block btn-lg text-left text-danger" onclick="post('/toggle_post_nsfw/{{p.id}}', function(){window.location.reload(true);})"><i class="far fa-eye-evil text-center text-danger mr-3"></i>Toggle +18</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and v.admin_level == 6 and v.id!=p.author_id %}
|
{% if v and v.admin_level == 6 and v.id!=p.author_id %}
|
||||||
{% if p.author.is_banned %}
|
{% if p.author.is_banned %}
|
||||||
<button class="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>
|
<button class="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 %}
|
{% else %}
|
||||||
<button class="btn btn-link btn-block btn-lg text-danger text-left" href="javascript:void(0)" onclick="post_toast('/ban_user/{{p.author_id}}/?reason={{p.permalink}}')"><i class="fas fa-user-minus mr-3"></i>Ban user</a></button>
|
<button class="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>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
|
@ -295,72 +295,75 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<ul class="list-group post-actions">
|
<ul class="list-group post-actions">
|
||||||
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="/votes?link={{p.fullname}}"><i class="fas fa-arrows-v text-center text-muted mr-3"></i>Votes</a></button>
|
|
||||||
|
|
||||||
{% if v and v.id!=p.author_id %}
|
|
||||||
<li class="list-inline-item text-muted d-none d-md-inline-block"><a href="javascript:void(0)" data-toggle="modal" data-target="#awardModal" onclick="awardModal('/post/{{p.id}}/awards')"><i class="fas fa-gift fa-fw"></i>Give Award</a></li>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if v and p.id in v.subscribed_idlist() %}
|
|
||||||
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="javascript:void(0)" onclick="post_toast('/unsubscribe/{{p.id}}')"><i class="fas fa-eye-slash text-center text-muted mr-3"></i>Unsubscribe</a></button>
|
|
||||||
{% elif v %}
|
|
||||||
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="javascript:void(0)" onclick="post_toast('/subscribe/{{p.id}}')"><i class="fas fa-eye text-center text-muted mr-3"></i>Subscribe</a></button>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if v and p.id in v.saved_idlist() %}
|
|
||||||
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="javascript:void(0)" onclick="post_toast('/unsave_post/{{p.id}}')"><i class="fas fa-save text-center text-muted mr-3"></i>Unsave</a></button>
|
|
||||||
{% elif v %}
|
|
||||||
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="javascript:void(0)" onclick="post_toast('/save_post/{{p.id}}')"><i class="fas fa-save text-center text-muted mr-3"></i>Save</a></button>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
<button class="btn btn-link btn-block btn-lg text-left text-muted" data-toggle="modal" data-dismiss="modal" data-target="#reportPostModal" onclick="report_postModal('{{p.id}}','{{'@'+p.author.username}}')" class="d-block"><i class="far fa-flag text-center text-muted mr-3"></i>Report</button>
|
<button class="btn btn-link btn-block btn-lg text-left text-muted" data-toggle="modal" data-dismiss="modal" data-target="#reportPostModal" onclick="report_postModal('{{p.id}}','{{'@'+p.author.username}}')" class="d-block"><i class="far fa-flag text-center text-muted mr-3"></i>Report</button>
|
||||||
|
|
||||||
{% if v and v.id==p.author_id %}
|
{% if v and v.id==p.author_id %}
|
||||||
<button class="btn btn-link btn-block btn-lg text-muted text-left" id="pin-post-{{p.id}}" href="javascript:void(0)" onclick="post_toast('/pin/{{p.id}}')"><i class="fas fa-thumbtack text-center mr-3"></i>{% if p.is_pinned %}Unpin from your profile{% else %}Pin to your profile{% endif %}</button>
|
{% if p.private %}
|
||||||
|
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="javascript:void(0)" onclick="post('/publish/{{p.id}}', function(){window.location.reload(true);})"><i class="fas fa-globe text-center text-muted mr-3"></i>Publish</a></button>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
<button class="btn btn-link btn-block btn-lg text-muted text-left" id="pin-post-{{p.id}}" href="javascript:void(0)" onclick="post('/pin/{{p.id}}',callback=function(){window.location.reload(true);})"><i class="fas fa-thumbtack text-center mr-3"></i>{% if p.is_pinned %}Unpin from your profile{% else %}Pin to your profile{% endif %}</button>
|
||||||
|
|
||||||
{% if p.deleted_utc > 0 %}
|
{% if p.deleted_utc > 0 %}
|
||||||
<button class="btn btn-link btn-block btn-lg text-left text-muted" href="javascript:void(0)" onclick="post_toast('/undelete_post/{{p.id}}')"><i class="far fa-trash-alt text-center text-muted mr-3"></i>Undelete</button>
|
<button class="btn btn-link btn-block btn-lg text-left text-muted" href="javascript:void(0)" onclick="post('/undelete_post/{{p.id}}', function(){window.location.reload(true);})"><i class="far fa-trash-alt text-center text-muted mr-3"></i>Undelete</button>
|
||||||
{% else %}
|
{% else %}
|
||||||
<button class="btn btn-link btn-block btn-lg text-left text-muted" data-toggle="modal" data-dismiss="modal" data-target="#deletePostModal" onclick="delete_postModal('{{p.id}}')"><i class="far fa-trash-alt text-center text-muted mr-3"></i>Delete</button>
|
<button class="btn btn-link btn-block btn-lg text-left text-muted" data-toggle="modal" data-dismiss="modal" data-target="#deletePostModal" onclick="delete_postModal('{{p.id}}')"><i class="far fa-trash-alt text-center text-muted mr-3"></i>Delete</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="/votes?link={{p.fullname}}"><i class="fas fa-arrows-v text-center text-muted mr-3"></i>Votes</a></button>
|
||||||
|
|
||||||
|
{% if v and v.id!=p.author_id %}
|
||||||
|
<button class="btn btn-link btn-block btn-lg text-left text-muted" data-toggle="modal" data-dismiss="modal" data-target="#awardModal" onclick="awardModal('/post/{{p.id}}/awards')"><i class="fas fa-gift text-center text-muted mr-3"></i>Give Award</button>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if v and p.id in v.subscribed_idlist() %}
|
||||||
|
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="javascript:void(0)" onclick="post('/unsubscribe/{{p.id}}', function(){window.location.reload(true);})"><i class="fas fa-eye-slash text-center text-muted mr-3"></i>Unsubscribe</a></button>
|
||||||
|
{% elif v %}
|
||||||
|
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="javascript:void(0)" onclick="post('/subscribe/{{p.id}}', function(){window.location.reload(true);})"><i class="fas fa-eye text-center text-muted mr-3"></i>Subscribe</a></button>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if v and p.id in v.saved_idlist() %}
|
||||||
|
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="javascript:void(0)" onclick="post('/unsave_post/{{p.id}}', function(){window.location.reload(true);})"><i class="fas fa-save text-center text-muted mr-3"></i>Unsave</a></button>
|
||||||
|
{% elif v %}
|
||||||
|
<button class="btn btn-link btn-block btn-lg text-left text-muted"><a href="javascript:void(0)" onclick="post('/save_post/{{p.id}}', function(){window.location.reload(true);})"><i class="fas fa-save text-center text-muted mr-3"></i>Save</a></button>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
{% if v %}
|
{% if v %}
|
||||||
{% if v.admin_level >=3 %}
|
{% if v.admin_level >=3 %}
|
||||||
<button class="btn btn-link btn-block btn-lg text-left" id="sticky-post-{{p.id}}" href="javascript:void(0)" onclick="post_toast('/sticky/{{p.id}}')"><i class="fas fa-thumbtack text-center mr-3"></i>{% if p.stickied %}Unpin{% else %}Pin{% endif %}</button>
|
<button class="btn btn-link btn-block btn-lg text-left" id="sticky-post-{{p.id}}" href="javascript:void(0)" onclick="post('/sticky/{{p.id}}',callback=function(){window.location.reload(true);})"><i class="fas fa-thumbtack text-center mr-3"></i>{% if p.stickied %}Unpin{% else %}Pin{% endif %}</button>
|
||||||
|
|
||||||
{% if v==p.author %}
|
{% if v==p.author %}
|
||||||
<button class="btn btn-link btn-block btn-lg text-left" id="distinguish-post-{{p.id}}" href="javascript:void(0)" onclick="post_toast('/distinguish/{{p.id}}')"><i class="fas fa-crown text-center mr-3"></i>Distinguish</button>
|
<button class="btn btn-link btn-block btn-lg text-left" id="distinguish-post-{{p.id}}" href="javascript:void(0)" onclick="post('/distinguish/{{p.id}}',callback=function(){window.location.reload(true);})"><i class="fas fa-crown text-center mr-3"></i>Distinguish</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
<button class="btn btn-link btn-block btn-lg text-success text-left" id="moderate-post-{{p.id}}" href="javascript:void(0)" onclick="post('/unban_post/{{p.id}}',callback=function(){window.location.reload(true);})"><i class="far fa-check text-center mr-3"></i>Approve</button>
|
||||||
<button class="btn btn-link btn-block btn-lg text-success text-left" id="moderate-post-{{p.id}}" href="javascript:void(0)" onclick="post_toast('/unban_post/{{p.id}}')"><i class="far fa-check text-center text-success mr-3"></i>Approve</button>
|
<button class="btn btn-link btn-block btn-lg text-danger text-left" id="moderate-post-{{p.id}}" href="javascript:void(0)" onclick="post('/ban_post/{{p.id}}',callback=function(){window.location.reload(true);})"><i class="far fa-ban text-center mr-3"></i>Remove</button>
|
||||||
<button class="btn btn-link btn-block btn-lg text-danger text-left" id="moderate-post-{{p.id}}" href="javascript:void(0)" onclick="post_toast('/ban_post/{{p.id}}')"><i class="far fa-ban text-center text-danger mr-3"></i>Remove</button>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if v and (v.id==p.author_id or v.admin_level>=3) %}
|
|
||||||
<button class="btn btn-link btn-block btn-lg text-left text-danger" onclick="post_toast('/toggle_post_nsfw/{{p.id}}')"><i class="far fa-eye-evil text-center mr-3"></i>Toggle +18</button>
|
|
||||||
{% endif %}
|
|
||||||
|
|
||||||
{% if v.admin_level >=3 and v.id!=p.author_id %}
|
|
||||||
{% if p.author.is_banned %}
|
|
||||||
<button class="btn btn-link btn-block btn-lg text-left text-danger" href="javascript:void(0)" onclick="post_toast('/unban_user/{{p.author_id}}')"><i class="fas fa-user-minus mr-3"></i>Unban user</a></button>
|
|
||||||
{% else %}
|
|
||||||
<button class="btn btn-link btn-block btn-lg text-left text-danger" href="javascript:void(0)" onclick="post_toast('/ban_user/{{p.author_id}}/?reason={{p.permalink}}')"><i class="fas fa-user-minus mr-3"></i>Ban user</a></button>
|
|
||||||
{% endif %}
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v.admin_level >=4 and p.oauth_app %}
|
{% if v.admin_level >=4 and p.oauth_app %}
|
||||||
<button class="btn btn-link btn-block btn-lg text-muted text-left" href="{{p.oauth_app.permalink}}"><a href="{{p.oauth_app.permalink}}"><i class="far fa-code text-center text-muted mr-3"></i>API App</a></button>
|
<button class="btn btn-link btn-block btn-lg text-muted text-left" href="{{p.oauth_app.permalink}}"><a href="{{p.oauth_app.permalink}}"><i class="far fa-code text-center text-info mr-3"></i>API App</a></button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% if v and not v.id==p.author_id and v.admin_level == 0 %}
|
{% if v and v.id != p.author_id and v.admin_level == 0 %}
|
||||||
<button id="block-user-button-{{p.id}}" class="btn btn-link btn-block btn-lg text-left text-muted{% if p.is_blocking %} d-none{% endif %}" data-dismiss="modal" onclick="post_toast('/settings/block?username={{p.author.username}}')"
|
<button id="block-user-button-{{p.id}}" class="btn btn-link btn-block btn-lg text-muted text-left{% if p.is_blocking %} d-none{% endif %}" data-dismiss="modal" onclick="post_toast('/settings/block?username={{p.author.username}}', callback=function(){document.getElementById('block-user-button-{{p.id}}').classList.toggle('d-none');document.getElementById('unblock-user-button-{{p.id}}').classList.toggle('d-none');})"
|
||||||
><i class="fas fa-eye-slash mr-3"></i>Block user</button>
|
><i class="fas fa-eye-slash mr-3"></i>Block user</button>
|
||||||
<button id="unblock-user-button-{{p.id}}" class="btn btn-link btn-block btn-lg text-left text-muted{% if not p.is_blocking %} d-none{% endif %}" data-dismiss="modal" onclick="post_toast('/settings/unblock?username={{p.author.username}}')"
|
<button id="unblock-user-button-{{p.id}}" class="btn btn-link btn-block btn-lg text-muted text-left{% if not p.is_blocking %} d-none{% endif %}" data-dismiss="modal" onclick="post_toast('/settings/unblock?username={{p.author.username}}', callback=function(){document.getElementById('block-user-button-{{p.id}}').classList.toggle('d-none');document.getElementById('unblock-user-button-{{p.id}}').classList.toggle('d-none');})"
|
||||||
><i class="fas fa-eye mr-3"></i>Unblock user</button>
|
><i class="fas fa-eye mr-3"></i>Unblock user</button>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
{% if v and (v.id==p.author_id or v.admin_level>=3) %}
|
||||||
|
<button class="btn btn-link btn-block btn-lg text-left text-danger" onclick="post('/toggle_post_nsfw/{{p.id}}', function(){window.location.reload(true);})"><i class="far fa-eye-evil text-center text-danger mr-3"></i>Toggle +18</button>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
|
{% if v and v.admin_level == 6 and v.id!=p.author_id %}
|
||||||
|
{% if p.author.is_banned %}
|
||||||
|
<button class="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="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>
|
||||||
|
{% endif %}
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in New Issue