fix
parent
3a6295c479
commit
6bdd455cee
|
@ -72,87 +72,84 @@
|
|||
<i class="fas fa-ellipsis-h fa-fw"></i>
|
||||
</button>
|
||||
<ul class="dropdown-menu w-56 bg-gray-900 rounded-md shadow-lg" aria-labelledby="dropdownPostActions">
|
||||
|
||||
<!-- Does not require auth -->
|
||||
<li>
|
||||
<button class="copy-link dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" role="button" data-clipboard-text="{% if 'rama' in request.host %}https://dogpill.life{{p.permalink}}{% else %}{{p.permalink | full_link}}{% endif %}">
|
||||
<i class="fas fa-link fa-sm fa-fw mr-4"></i>Copy link
|
||||
</button>
|
||||
</li>
|
||||
<!-- Requies auth -->
|
||||
{% if v %}
|
||||
<!-- Requires auth and admin and author -->
|
||||
{% if v.admin_level >=3 or v.id == p.author.id and v.paid_dues %}
|
||||
<li id="save-{{p.id}}" class="{% if p.id in v.saved_idlist() %}hidden{% endif %}">
|
||||
<button class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast2('/save_post/{{p.id}}','save-{{p.id}}','unsave-{{p.id}}')">
|
||||
<i class="far fa-bookmark fa-sm fa-fw mr-4"></i>Save
|
||||
</button>
|
||||
</li>
|
||||
<li id="unsave-{{p.id}}" class="{% if not p.id in v.saved_idlist() %}hidden{% endif %}">
|
||||
<button class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast2('/unsave_post/{{p.id}}','save-{{p.id}}','unsave-{{p.id}}')">
|
||||
<i class="fas fa-bookmark fa-sm fa-fw mr-4"></i>Unsave
|
||||
</button>
|
||||
</li>
|
||||
{% endif %}
|
||||
<!-- Requires author -->
|
||||
{% if v and v.id==p.author_id %}
|
||||
<li>
|
||||
<hr class="mt-2 mb-1.5 border-t border-black h-1 shadow-inset-t-white-05"/>
|
||||
</li>
|
||||
<li class="{% if p.club %}hidden{% endif %}">
|
||||
<button id="club-{{p.id}}" class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast2('/toggle_club/{{p.id}}','club-{{p.id}}','unclub-{{p.id}}')">
|
||||
<i class="fas fa-eye-slash fa-sm fa-fw mr-4"></i>Mark club
|
||||
<li class="{% if p.is_stickied %}hidden{% endif %}">
|
||||
<button id="pin-profile-{{p.id}}" class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast2('/pin/{{p.id}}','unpin-profile-{{p.id}}','pin-profile-{{p.id}}')">
|
||||
<i class="fas fa-thumbtack fa-rotate--45 fa-sm fa-fw mr-4"></i>Pin to profile
|
||||
</button>
|
||||
</li>
|
||||
<li class="{% if not p.club %}hidden{% endif %}">
|
||||
<button id="unclub-{{p.id}}" class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast2('/toggle_club/{{p.id}}','club-{{p.id}}','unclub-{{p.id}}')"><i class="fas fa-eye fa-sm fa-fw mr-4"></i>Unmark club
|
||||
<li class="{% if not p.is_stickied %}hidden{% endif %}">
|
||||
<button id="unpin-profile-{{p.id}}" class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast2('/pin/{{p.id}}','unpin-profile-{{p.id}}','pin-profile-{{p.id}}')">
|
||||
<i class="fas fa-thumbtack fa-rotate--45 fa-sm fa-fw mr-4"></i>Unpin from profile
|
||||
</button>
|
||||
</li>
|
||||
{% endif %}
|
||||
<!-- Requires admin and post has been reported -->
|
||||
{% if v.admin_level >=3 %}
|
||||
<!-- Requires non author -->
|
||||
{% if v.id != p.author.id %}
|
||||
<li id="remove-{{p.id}}" class="{% if p.is_banned %}hidden{% endif %} text-red-600">
|
||||
<button class="dropdown-item block w-full text-left px-4 py-2 text-sm text-red-600 hover:text-white bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast2('/ban_post/{{p.id}}','remove-{{p.id}}','approve-{{p.id}}')">
|
||||
<i class="fas fa-ban fa-sm fa-fw mr-4"></i>Remove
|
||||
</button>
|
||||
</li>
|
||||
{% endif %}
|
||||
<li id="approve-{{p.id}}" class="{% if not p.is_banned %}hidden{% endif %}">
|
||||
<button class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast2('/unban_post/{{p.id}}','remove-{{p.id}}','approve-{{p.id}}')">
|
||||
<i class="fas fa-check fa-sm fa-fw mr-4"></i>Approve
|
||||
</button>
|
||||
</li>
|
||||
{% endif %}
|
||||
<!-- Requires admin or author -->
|
||||
{% if v.id == p.author_id or v.admin_level >= 3 %}
|
||||
<li id="mark-{{p.id}}" class="{% if p.over_18 %}hidden{% endif %}">
|
||||
<button class="dropdown-item block w-full text-left px-4 py-2 text-sm text-red-600 hover:text-white bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast2('/toggle_post_nsfw/{{p.id}}','mark-{{p.id}}','unmark-{{p.id}}')">
|
||||
<i class="fas fa-eye-evil fa-sm fa-fw mr-4"></i>Mark +18
|
||||
</button>
|
||||
</li>
|
||||
<li id="unmark-{{p.id}}" class="{% if not p.over_18 %}hidden{% endif %}">
|
||||
<button class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast2('/toggle_post_nsfw/{{p.id}}','mark-{{p.id}}','unmark-{{p.id}}')">
|
||||
<i class="fas fa-eye-evil fa-sm fa-fw mr-4"></i>Unmark +18
|
||||
</button>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if v.id != p.author_id and v.admin_level == 1 %}
|
||||
<li id="sex-user-{{p.id}}" class="{% if p.is_blocking %}hidden{% endif %} text-red-600">
|
||||
<button class="dropdown-item block w-full text-left px-4 py-2 text-sm text-red-600 hover:text-white bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast2('/settings/block?username={{p.author.username}}','sex-user-{{p.id}}','unsex-user-{{p.id}}')">
|
||||
<i class="fas fa-user-slash fa-sm fa-fw mr-4"></i>Ban user
|
||||
</button>
|
||||
</li>
|
||||
<li id="unsex-user-{{p.id}}" class="{% if not p.is_blocking %}hidden{% endif %}">
|
||||
<button class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast2('/settings/unblock?username={{p.author.username}}','sex-user-{{p.id}}','unsex-user-{{p.id}}')">
|
||||
<i class="fas fa-user-check fa-sm fa-fw mr-4"></i>Unban user
|
||||
</button>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% if v.admin_level >=3 and v.id != p.author_id %}
|
||||
<li id="ban-{{p.id}}" class="{% if p.author.is_suspended %}hidden{% endif %} text-red-600">
|
||||
<button class="dropdown-item block w-full text-left px-4 py-2 text-sm text-red-600 hover:text-white bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" data-bs-toggle="modal" data-bs-target="#banModal" onclick="banModal('/post/{{p.id}}', '{{ p.author.id }}', '{{p.author.username}}')">
|
||||
<i class="fas fa-user-slash fa-sm fa-fw mr-4"></i>Ban user
|
||||
</button>
|
||||
</li>
|
||||
<li id="unban-{{p.id}}" class="{% if not p.author.is_suspended %}hidden{% endif %}">
|
||||
<button class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" id="unexile2-user-{{p.id}}" onclick="post_toast2('/unban_user/{{p.author_id}}','ban-{{p.id}}','unban-{{p.id}}')">
|
||||
<i class="fas fa-user-check fa-sm fa-fw mr-4"></i>Unban user
|
||||
</button>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
<!-- Requires super admin and app -->
|
||||
{% if v.admin_level >= 4 and p.oauth_app %}
|
||||
{% if p.deleted_utc > 0 %}
|
||||
<li>
|
||||
<a class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" href="{{p.oauth_app.permalink}}">
|
||||
<i class="fas fa-code fa-sm fa-fw mr-4"></i>API App
|
||||
</a>
|
||||
<button class="dropdown-item dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast('/undelete_post/{{p.id}}')">
|
||||
<i class="fas fa-trash-alt fa-sm fa-fw mr-4"></i>Undelete
|
||||
</button>
|
||||
</li>
|
||||
{% else %}
|
||||
<li>
|
||||
<button class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#deletePostModal" onclick="delete_postModal('{{p.id}}')">
|
||||
<i class="fas fa-trash-alt fa-sm fa-fw mr-4"></i>Delete
|
||||
</button>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
<!-- Requires auth and admin -->
|
||||
{% if v and v.admin_level>=3 %}
|
||||
<li>
|
||||
<hr class="mt-2 mb-1.5 border-t border-black h-1 shadow-inset-t-white-05"/>
|
||||
</li>
|
||||
<li class="{% if p.stickied %}hidden{% endif %}">
|
||||
<button id="pin-{{p.id}}" class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast2('/sticky/{{p.id}}','pin-{{p.id}}','unpin-{{p.id}}')">
|
||||
<i class="fas fa-thumbtack fa-rotate--45 fa-sm fa-fw mr-4"></i>Pin
|
||||
</button>
|
||||
</li>
|
||||
<li class="{% if not p.stickied %}hidden{% endif %}">
|
||||
<button id="unpin-{{p.id}}" class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast2('/sticky/{{p.id}}','/sticky/{{p.id}}','pin-{{p.id}}','unpin-{{p.id}}')">
|
||||
<i class="fas fa-thumbtack fa-rotate--45 fa-sm fa-fw mr-4"></i>Unpin
|
||||
</button>
|
||||
</li>
|
||||
<!-- Requires author -->
|
||||
{% if v==p.author %}
|
||||
<li class="{% if p.distinguish_level %}hidden{% endif %}">
|
||||
<button id="distinguish-{{p.id}}" class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast2('/distinguish/{{p.id}}','distinguish-{{p.id}}','undistinguish-{{p.id}}')">
|
||||
<i class="fas fa-crown fa-sm fa-fw mr-4"></i>Distinguish
|
||||
</button>
|
||||
</li>
|
||||
<li class="{% if not p.distinguish_level %}hidden{% endif %}">
|
||||
<button id="undistinguish-{{p.id}}" class="dropdown-item block w-full text-left px-4 py-2 text-sm text-gray-200 bg-gradient-to-t hover:from-red-800 hover:to-red-700 hover:shadow-inner focus:shadow-inner focus:bg-gradient-to-t focus:from-red-800 focus:to-red-700" onclick="post_toast2('/distinguish/{{p.id}}','distinguish-{{p.id}}','undistinguish-{{p.id}}')">
|
||||
<i class="fas fa-crown fa-sm fa-fw mr-4"></i>Undistinguish
|
||||
</button>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
<!-- Requires not author -->
|
||||
{% if not v.id==p.author_id and not p.award_count('ghosts') %}
|
||||
<li>
|
||||
|
|
Loading…
Reference in New Issue