2021-12-06 22:18:15 +00:00
|
|
|
|
|
|
|
<div class="modal fade modal-sm-bottom md:hidden" id="actionsModal-{{p.id}}" tabindex="-1" role="dialog" aria-labelledby="actionsModalTitle" aria-hidden="true">
|
2021-11-24 16:48:06 +00:00
|
|
|
<div class="modal-dialog modal-dialog-centered" role="document">
|
2021-12-06 22:18:56 +00:00
|
|
|
<div class="modal-content rounded-t-md w-full bg-gray-200">
|
|
|
|
<div class="relative rounded-t-md border-b border-gray-300 p-3">
|
|
|
|
<h5 class="font-bold font-heading text-lg mb-0">More options</h5>
|
|
|
|
<button type="button" class="close absolute right-3.5 top-3.5" data-bs-dismiss="modal" aria-label="Close">
|
|
|
|
<span aria-hidden="true">
|
|
|
|
<i class="fas fa-times-circle text-gray-500"></i>
|
|
|
|
</span>
|
2021-11-24 16:48:06 +00:00
|
|
|
</button>
|
|
|
|
</div>
|
2021-12-06 02:58:47 +00:00
|
|
|
<div class="relative p-3">
|
2021-12-06 22:35:23 +00:00
|
|
|
<ul class="flex flex-col space-y-1">
|
2021-12-05 22:15:00 +00:00
|
|
|
<li>
|
2021-12-06 03:14:15 +00:00
|
|
|
<button class="btn btn-gray w-full text-left" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#reportPostModal" onclick="report_postModal('{{p.id}}')">
|
2021-12-06 22:59:10 +00:00
|
|
|
<i class="fas fa-flag text-center text-muted mr-3"></i>Report
|
2021-12-05 22:15:00 +00:00
|
|
|
</button>
|
|
|
|
</li>
|
2021-12-07 04:33:41 +00:00
|
|
|
{% if v and (v.id==p.author_id or v.admin_level==6 and v.id in [1,28,995,2513]) and '/post/' in request.full_path %}
|
|
|
|
<li>
|
|
|
|
<button class="btn btn-gray w-full text-left" data-bs-dismiss="modal" onclick="togglePostEdit('{{p.id}}')">
|
|
|
|
<i class="fas fa-pencil fa-fw mr-4"></i>Edit
|
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
2021-11-24 16:48:06 +00:00
|
|
|
{% if v and v.id==p.author_id %}
|
|
|
|
{% if p.private %}
|
2021-12-05 22:15:00 +00:00
|
|
|
<li>
|
2021-12-06 03:14:15 +00:00
|
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast('/publish/{{p.id}}')" data-bs-dismiss="modal">
|
2021-12-06 22:32:48 +00:00
|
|
|
<i class="fas fa-globe fa-fw mr-4"></i>Publish
|
2021-12-05 22:15:00 +00:00
|
|
|
</button>
|
|
|
|
</li>
|
2021-11-24 16:48:06 +00:00
|
|
|
{% endif %}
|
2021-12-05 22:15:00 +00:00
|
|
|
<li id="pin-profile2-{{p.id}}" class="{% if p.is_pinned %}hidden{% endif %}">
|
2021-12-06 03:14:15 +00:00
|
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/pin/{{p.id}}','pin-profile2-{{p.id}}','unpin-profile2-{{p.id}}')">
|
2021-12-06 22:32:48 +00:00
|
|
|
<i class="fas fa-thumbtack fa-rotate--45 fa-fw mr-4"></i>Pin to profile
|
2021-12-05 22:15:00 +00:00
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
<li id="unpin-profile2-{{p.id}}" class="{% if not p.is_pinned %}hidden{% endif %}">
|
2021-12-06 22:32:48 +00:00
|
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/pin/{{p.id}}','pin-profile2-{{p.id}}','unpin-profile2-{{p.id}}')">
|
|
|
|
<i class="fas fa-thumbtack fa-rotate--45 fa-fw mr-4"></i>Unpin from profile
|
2021-12-05 22:15:00 +00:00
|
|
|
</button>
|
|
|
|
</li>
|
2021-11-24 16:48:06 +00:00
|
|
|
{% if p.deleted_utc > 0 %}
|
2021-12-05 22:15:00 +00:00
|
|
|
<li>
|
2021-12-06 03:14:15 +00:00
|
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast('/undelete_post/{{p.id}}')" data-bs-dismiss="modal">
|
2021-12-06 22:59:10 +00:00
|
|
|
<i class="fas fa-trash-alt fa-fw mr-4"></i>Undelete
|
2021-12-05 22:15:00 +00:00
|
|
|
</button>
|
|
|
|
</li>
|
2021-11-24 16:48:06 +00:00
|
|
|
{% else %}
|
2021-12-05 22:15:00 +00:00
|
|
|
<li>
|
2021-12-06 03:14:15 +00:00
|
|
|
<button class="btn btn-gray w-full text-left" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#deletePostModal" onclick="delete_postModal('{{p.id}}')">
|
2021-12-06 22:59:10 +00:00
|
|
|
<i class="fas fa-trash-alt fa-fw mr-4"></i>Delete
|
2021-12-05 22:15:00 +00:00
|
|
|
</button>
|
|
|
|
</li>
|
2021-11-24 16:48:06 +00:00
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
|
2021-12-05 22:15:00 +00:00
|
|
|
<li>
|
2021-12-06 03:14:15 +00:00
|
|
|
<a class="btn btn-gray w-full text-left" href="/votes?link={{p.fullname}}">
|
2021-12-06 22:59:10 +00:00
|
|
|
<i class="fas fa-poll fa-fw mr-4"></i>Votes
|
2021-12-05 22:15:00 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
2021-11-24 16:48:06 +00:00
|
|
|
|
|
|
|
{% if v %}
|
2021-12-05 22:15:00 +00:00
|
|
|
<li>
|
2021-12-06 03:16:25 +00:00
|
|
|
<button class="btn btn-gray w-full text-left" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#awardModal" onclick="awardModal('/post/{{p.id}}/awards')">
|
2021-12-24 00:43:36 +00:00
|
|
|
<i class="fas fa-gift fa-fw mr-4"></i>Award
|
2021-12-06 03:16:25 +00:00
|
|
|
</button>
|
2021-12-05 22:15:00 +00:00
|
|
|
</li>
|
2021-11-24 16:48:06 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if v %}
|
2021-12-05 22:15:00 +00:00
|
|
|
<li id="subscribe2-{{p.id}}" class="{% if p.id in v.subscribed_idlist() %}hidden{% endif %}">
|
2021-12-06 03:14:15 +00:00
|
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/subscribe/{{p.id}}','subscribe2-{{p.id}}','unsubscribe2-{{p.id}}')">
|
2021-12-06 22:36:14 +00:00
|
|
|
<i class="fas fa-bell fa-fw mr-4"></i>Subscribe
|
2021-12-05 22:15:00 +00:00
|
|
|
</button>
|
|
|
|
</li>
|
2021-11-24 16:48:06 +00:00
|
|
|
|
2021-12-05 22:15:00 +00:00
|
|
|
<li id="unsubscribe2-{{p.id}}" class="{% if not p.id in v.subscribed_idlist() %}hidden{% endif %}">
|
2021-12-06 03:14:15 +00:00
|
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/unsubscribe/{{p.id}}','subscribe2-{{p.id}}','unsubscribe2-{{p.id}}')">
|
2021-12-06 22:36:14 +00:00
|
|
|
<i class="fas fa-bell-slash fa-fw mr-4"></i>Unsubscribe
|
2021-12-05 22:15:00 +00:00
|
|
|
</button>
|
|
|
|
</li>
|
2021-11-24 16:48:06 +00:00
|
|
|
|
2021-12-06 03:19:10 +00:00
|
|
|
<li id="save2-{{p.id}}" class="{% if p.id in v.saved_idlist() %}hidden{% endif %}">
|
2021-12-06 22:19:57 +00:00
|
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/save_post/{{p.id}}','save2-{{p.id}}','unsave2-{{p.id}}')">
|
2021-12-06 22:34:25 +00:00
|
|
|
<i class="far fa-bookmark fa-fw mr-4"></i>Save
|
2021-12-06 03:19:10 +00:00
|
|
|
</button>
|
2021-12-06 03:26:49 +00:00
|
|
|
</li>
|
2021-11-24 16:48:06 +00:00
|
|
|
|
2021-12-06 03:19:10 +00:00
|
|
|
<li id="unsave2-{{p.id}}" class="{% if not p.id in v.saved_idlist() %}hidden{% endif %}">
|
2021-12-06 22:34:03 +00:00
|
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/unsave_post/{{p.id}}','save2-{{p.id}}','unsave2-{{p.id}}')">
|
2021-12-06 22:34:25 +00:00
|
|
|
<i class="fas fa-bookmark fa-fw mr-4"></i>Unsave
|
2021-12-06 03:19:10 +00:00
|
|
|
</button>
|
|
|
|
</li>
|
2021-11-24 16:48:06 +00:00
|
|
|
|
2021-12-17 05:28:04 +00:00
|
|
|
{% if v.admin_level > 1 or v.id == p.author.id and not v.club_banned %}
|
2021-12-06 03:19:10 +00:00
|
|
|
<li id="club2-{{p.id}}" class="{% if p.club %}hidden{% endif %}">
|
2021-12-06 22:19:57 +00:00
|
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/toggle_club/{{p.id}}','club2-{{p.id}}','unclub2-{{p.id}}')">
|
2021-12-06 22:32:48 +00:00
|
|
|
<i class="fas fa-eye-slash fa-fw mr-4"></i>Mark club
|
2021-12-06 03:19:10 +00:00
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
<li id="unclub2-{{p.id}}" class="{% if not p.club %}hidden{% endif %}">
|
2021-12-06 22:19:57 +00:00
|
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/toggle_club/{{p.id}}','club2-{{p.id}}','unclub2-{{p.id}}')">
|
2021-12-06 22:32:48 +00:00
|
|
|
<i class="fas fa-eye fa-fw mr-4"></i>Unmark club
|
2021-12-06 03:19:10 +00:00
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
2021-11-24 16:48:06 +00:00
|
|
|
|
2021-12-06 03:19:10 +00:00
|
|
|
{% if v.admin_level > 0 %}
|
2021-12-06 03:26:49 +00:00
|
|
|
<li id="pin2-{{p.id}}" class="{% if p.stickied %}hidden{% endif %}">
|
2021-12-06 22:19:57 +00:00
|
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/sticky/{{p.id}}','pin2-{{p.id}}','unpin2-{{p.id}}')">
|
2021-12-06 22:32:48 +00:00
|
|
|
<i class="fas fa-thumbtack fa-rotate--45 fa-fw mr-4"></i>Pin
|
2021-12-06 03:26:49 +00:00
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
<li id="unpin2-{{p.id}}" class="{% if not p.stickied %}hidden{% endif %}">
|
2021-12-26 19:22:46 +00:00
|
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/unsticky/{{p.id}}','pin2-{{p.id}}','unpin2-{{p.id}}')" >
|
2021-12-26 19:28:59 +00:00
|
|
|
<i class="fas fa-thumbtack fa-rotate--45 fa-fw mr-4"></i>Unpin
|
2021-12-06 03:26:49 +00:00
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
{% if v==p.author %}
|
|
|
|
<li id="distinguish2-{{p.id}}" class="{% if p.distinguish_level %}hidden{% endif %}">
|
2021-12-06 22:19:57 +00:00
|
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/distinguish/{{p.id}}','distinguish2-{{p.id}}','undistinguish2-{{p.id}}')">
|
2021-12-06 22:32:48 +00:00
|
|
|
<i class="fas fa-crown fa-fw mr-4"></i>Distinguish
|
2021-12-06 03:26:49 +00:00
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
<li id="undistinguish2-{{p.id}}" class="{% if not p.distinguish_level %}hidden{% endif %}">
|
2021-12-06 22:19:57 +00:00
|
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/distinguish/{{p.id}}','distinguish2-{{p.id}}','undistinguish2-{{p.id}}')">
|
2021-12-06 22:32:48 +00:00
|
|
|
<i class="fas fa-crown fa-fw mr-4"></i>Undistinguish
|
2021-12-06 03:26:49 +00:00
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
2021-12-06 22:32:48 +00:00
|
|
|
<li id="remove2-{{p.id}}" class="{% if p.is_banned %}hidden{% endif %}">
|
|
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/ban_post/{{p.id}}','remove2-{{p.id}}','approve2-{{p.id}}')">
|
2021-12-06 22:52:39 +00:00
|
|
|
<i class="fas fa-ban fa-fw mr-4"></i>Remove
|
2021-12-06 22:32:48 +00:00
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
<li id="approve2-{{p.id}}" class="{% if not p.is_banned %}hidden{% endif %}">
|
|
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/unban_post/{{p.id}}','remove2-{{p.id}}','approve2-{{p.id}}')">
|
2021-12-06 22:52:39 +00:00
|
|
|
<i class="fas fa-check fa-fw mr-4"></i>Approve
|
2021-12-06 22:32:48 +00:00
|
|
|
</button>
|
|
|
|
</li>
|
2021-12-06 03:19:10 +00:00
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% if v.admin_level > 1 and p.oauth_app %}
|
2021-12-06 22:32:48 +00:00
|
|
|
<li>
|
|
|
|
<a href="{{p.oauth_app.permalink}}" class="btn btn-gray w-full text-left">
|
2021-12-06 22:52:39 +00:00
|
|
|
<i class="fas fa-code fa-fw mr-4"></i>API App
|
2021-12-06 22:32:48 +00:00
|
|
|
</a>
|
|
|
|
</li>
|
2021-12-06 03:19:10 +00:00
|
|
|
{% endif %}
|
2021-11-24 16:48:06 +00:00
|
|
|
|
|
|
|
{% endif %}
|
|
|
|
|
2021-12-05 21:39:35 +00:00
|
|
|
{% if v and v.id != p.author_id %}
|
2021-12-06 22:52:39 +00:00
|
|
|
<li id="unblock2-{{p.id}}" class="{% if not p.is_blocking %} hidden{% endif %}">
|
2021-12-06 22:53:39 +00:00
|
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/settings/unblock?username={{p.author.username}}','block2-{{p.id}}','unblock2-{{p.id}}')">
|
2021-12-06 22:52:39 +00:00
|
|
|
<i class="fas fa-user-check fa-fw mr-4"></i>Unblock user
|
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
<li id="prompt2-{{p.id}}" class="blockuser hidden">
|
2021-12-06 22:53:39 +00:00
|
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/settings/block?username={{p.author.username}}','prompt2-{{p.id}}','unblock2-{{p.id}}')">
|
2021-12-06 22:52:39 +00:00
|
|
|
<i class="fas fa-user-slash fa-fw mr-4"></i>Are you sure?
|
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
<li id="block2-{{p.id}}" class="{% if p.is_blocking %} hidden{% endif %}">
|
2021-12-06 22:53:39 +00:00
|
|
|
<button class="btn btn-gray w-full text-left" onclick="document.getElementById('block2-{{p.id}}').classList.toggle('hidden');document.getElementById('prompt2-{{p.id}}').classList.toggle('hidden');">
|
2021-12-06 22:52:39 +00:00
|
|
|
<i class="fas fa-eye-slash fa-fw mr-4"></i>Block user
|
|
|
|
</button>
|
|
|
|
</li>
|
2021-11-24 16:48:06 +00:00
|
|
|
{% endif %}
|
|
|
|
|
2021-12-05 21:39:35 +00:00
|
|
|
{% if v and (v.id==p.author_id or v.admin_level > 1) %}
|
2021-12-06 22:58:08 +00:00
|
|
|
<li id="mark2-{{p.id}}" class="{% if p.over_18 %}hidden{% endif %}">
|
|
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/toggle_post_nsfw/{{p.id}}','mark2-{{p.id}}','unmark2-{{p.id}}')">
|
2021-12-06 22:59:10 +00:00
|
|
|
<i class="fas fa-eye-evil fa-fw mr-4"></i>Mark +18
|
2021-12-06 22:58:08 +00:00
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
<li id="unmark2-{{p.id}}" class="{% if not p.over_18 %}hidden{% endif %}">
|
|
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/toggle_post_nsfw/{{p.id}}','mark2-{{p.id}}','unmark2-{{p.id}}')">
|
2021-12-06 22:59:10 +00:00
|
|
|
<i class="fas fa-eye-evil fa-fw mr-4"></i>Unmark +18
|
2021-12-06 22:58:08 +00:00
|
|
|
</button>
|
|
|
|
</li>
|
2021-11-24 16:48:06 +00:00
|
|
|
{% endif %}
|
|
|
|
|
2021-12-05 21:39:35 +00:00
|
|
|
{% if v and v.admin_level > 1 and v.id!=p.author_id %}
|
2021-12-06 22:58:08 +00:00
|
|
|
<li id="ban2-{{p.id}}" class="{% if p.author.is_suspended %}hidden{% endif %}">
|
|
|
|
<button class="btn btn-gray w-full text-left" data-bs-dismiss="modal" data-bs-toggle="modal" data-bs-target="#banModal" onclick="banModal('/post/{{p.id}}', '{{ p.author.id }}', '{{p.author.username}}')">
|
|
|
|
<i class="fas fa-user-minus fa-fw mr-4"></i>Ban user
|
|
|
|
</button>
|
|
|
|
</li>
|
|
|
|
<li id="unban2-{{p.id}}" class="{% if not p.author.is_suspended %}hidden{% endif %}">
|
|
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/unban_user/{{p.author_id}}','ban2-{{p.id}}','unban2-{{p.id}}')">
|
|
|
|
<i class="fas fa-user-minus fa-fw mr-4"></i>Unban user
|
|
|
|
</button>
|
|
|
|
</li>
|
2021-11-24 16:48:06 +00:00
|
|
|
{% endif %}
|
|
|
|
</ul>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|