164 lines
No EOL
8.4 KiB
HTML
164 lines
No EOL
8.4 KiB
HTML
<div class="modal fade modal-sm-bottom md:hidden" id="actionsModal-{{c.id}}" tabindex="-1" role="dialog" aria-labelledby="actionsModalTitle" aria-hidden="true">
|
|
<div class="modal-dialog modal-dialog-centered" role="document">
|
|
<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>
|
|
</button>
|
|
</div>
|
|
<div class="relative p-3">
|
|
<ul class="flex flex-col space-y-1">
|
|
<li>
|
|
<a class="btn btn-gray w-full text-left" href="/votes?link={{c.fullname}}">
|
|
<i class="fas fa-poll fa-fw mr-4"></i>Votes
|
|
</a>
|
|
</li>
|
|
{% if v %}
|
|
<li>
|
|
<button class="btn btn-gray w-full text-left" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#awardModal" onclick="awardModal('/comment/{{c.id}}/awards')">
|
|
<i class="fas fa-gift fa-fw mr-4"></i>Give Award
|
|
</button>
|
|
</li>
|
|
<li id="save2-{{c.id}}" class="{% if c.id in v.saved_comment_idlist() %}hidden{% endif %}">
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/save_comment/{{c.id}}','save2-{{c.id}}','unsave2-{{c.id}}')">
|
|
<i class="far fa-bookmark fa-fw mr-4"></i>Save
|
|
</button>
|
|
</li>
|
|
<li id="unsave2-{{c.id}}" class="{% if c.id not in v.saved_comment_idlist() %}hidden{% endif %}">
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/unsave_comment/{{c.id}}','save2-{{c.id}}','unsave2-{{c.id}}')">
|
|
<i class="fas fa-bookmark fa-fw mr-4"></i>Unsave
|
|
</button>
|
|
</li>
|
|
{% endif %}
|
|
<li>
|
|
<button class="btn btn-gray w-full text-left copy-link" data-bs-dismiss="modal" data-clipboard-text="{% if 'rama' in request.host %}https://freeghettohoes.biz{{c.permalink}}{% else %}{{c.permalink | full_link}}{% endif %}">
|
|
<i class="fas fa-copy fa-fw mr-4"></i>Copy link
|
|
</button>
|
|
</li>
|
|
<li>
|
|
<a class="btn btn-gray w-full text-left" href="{{c.permalink}}">
|
|
<i class="fas fa-dna fa-fw mr-4"></i>Context
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<button class="btn btn-gray w-full text-left" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#reportCommentModal" onclick="report_commentModal('{{c.id}}','{{c.author.username}}')">
|
|
<i class="fas fa-flag fa-fw mr-4"></i>Report
|
|
</button>
|
|
</li>
|
|
{% if v and c.parent_submission and c.author_id==v.id %}
|
|
<li>
|
|
<button class="btn btn-gray w-full text-left" data-bs-dismiss="modal" onclick="toggleEdit('{{c.id}}')">
|
|
<i class="fas fa-pencil fa-fw mr-4"></i>Edit
|
|
</button>
|
|
</li>
|
|
{% if c.deleted_utc > 0 %}
|
|
<li>
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast('/undelete/comment/{{c.id}}')" data-bs-dismiss="modal">
|
|
<i class="fas fa-trash-alt fa-fw mr-4"></i>Undelete
|
|
</button>
|
|
</li>
|
|
{% else %}
|
|
<li>
|
|
<button class="btn btn-gray w-full text-left" data-bs-toggle="modal" data-bs-target="#deleteCommentModal" onclick="delete_commentModal('{{c.id}}')">
|
|
<i class="fas fa-trash-alt fa-fw mr-4"></i>Delete
|
|
</button>
|
|
</li>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% if v and c.post and (v.admin_level > 1 or v.id == c.post.author_id) %}
|
|
<li id="pin2-{{c.id}}" class="{% if c.is_pinned %}hidden{% endif %}">
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/pin_comment/{{c.id}}','pin2-{{c.id}}','unpin2-{{c.id}}')">
|
|
<i class="fas fa-thumbtack fa-rotate--45 fa-fw mr-4"></i>Pin
|
|
</button>
|
|
</li>
|
|
<li id="unpin2-{{c.id}}" class="{% if not c.is_pinned %}hidden{% endif %}">
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/pin_comment/{{c.id}}','pin2-{{c.id}}','unpin2-{{c.id}}')">
|
|
<i class="fas fa-thumbtack fa-rotate--45 fa-fw mr-4"></i>Unpin
|
|
</button>
|
|
</li>
|
|
{% endif %}
|
|
{% if v %}
|
|
{% if v.admin_level>=1 and v.id==c.author_id %}
|
|
<li id="distinguish2-{{c.id}}" class="{% if c.distinguish_level %}hidden{% endif %}">
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/distinguish_comment/{{c.id}}','distinguish2-{{c.id}}','undistinguish2-{{c.id}}')">
|
|
<i class="fas fa-id-badge fa-fw mr-4"></i>Distinguish
|
|
</button>
|
|
</li>
|
|
<li id="undistinguish2-{{c.id}}" class="{% if not c.distinguish_level %}hidden{% endif %}">
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/distinguish_comment/{{c.id}}','distinguish2-{{c.id}}','undistinguish2-{{c.id}}')">
|
|
<i class="fas fa-id-badge fa-fw mr-4"></i>Undistinguish
|
|
</button>
|
|
</li>
|
|
{% endif %}
|
|
{% if v.admin_level>=3 %}
|
|
<li id="remove2-{{c.id}}" class="{% if c.is_banned %}hidden{% endif %}">
|
|
<button class="btn btn-gray w-full text-left" onclick="removeComment2('{{c.id}}','approve2-{{c.id}}','remove2-{{c.id}}')">
|
|
<i class="fas fa-ban fa-fw mr-4"></i>Remove
|
|
</button>
|
|
</li>
|
|
<li id="approve2-{{c.id}}" class="{% if not c.is_banned %}hidden{% endif %}">
|
|
<button class="btn btn-gray w-full text-left" onclick="approveComment2('{{c.id}}','approve2-{{c.id}}','remove2-{{c.id}}')">
|
|
<i class="fas fa-check fa-fw mr-4"></i>Approve
|
|
</button>
|
|
</li>
|
|
{% endif %}
|
|
{% if v.admin_level >=4 and c.oauth_app %}
|
|
<li>
|
|
<a href="{{c.oauth_app.permalink}}/comments" class="btn btn-gray w-full text-left">
|
|
<i class="fas fa-code fa-fw mr-4"></i>API App
|
|
</a>
|
|
</li>
|
|
{% endif %}
|
|
{% if not v.id==c.author_id and not (c.post and c.post.award_count("ghosts")) %}
|
|
<li id="unblock2-{{c.id}}" class="{% if not c.is_blocking %}hidden{% endif %}">
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/settings/unblock?username={{c.author.username}}','block2-{{c.id}}','unblock2-{{c.id}}')">
|
|
<i class="fas fa-user-check fa-fw mr-4"></i>Unblock user
|
|
</button>
|
|
</li>
|
|
<li id="prompt2-{{c.id}}" class="blockuser hidden">
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/settings/block?username={{c.author.username}}','prompt2-{{c.id}}','unblock2-{{c.id}}')">
|
|
<i class="fas fa-question-circle fa-fw mr-4"></i>Are you sure?
|
|
</button>
|
|
</li>
|
|
<li id="block2-{{c.id}}" class="{% if c.is_blocking %}hidden{% endif %}">
|
|
<button class="btn btn-gray w-full text-left" onclick="document.getElementById('block2-{{c.id}}').classList.toggle('hidden');document.getElementById('prompt2-{{c.id}}').classList.toggle('hidden');">
|
|
<i class="fas fa-user-slash fa-fw mr-4"></i>Block user
|
|
</button>
|
|
</li>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% if v and c.parent_submission and (c.author_id==v.id or v.admin_level > 0) %}
|
|
<li id="mark2-{{c.id}}" class="{% if c.over_18 %}hidden{% endif %}">
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/toggle_comment_nsfw/{{c.id}}','mark2-{{c.id}}','unmark2-{{c.id}}')">
|
|
<i class="fas fa-eye-evil fa-fw mr-4"></i>Mark +18
|
|
</button>
|
|
</li>
|
|
<li id="unmark2-{{c.id}}" class="{% if not c.over_18 %}hidden{% endif %}">
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/toggle_comment_nsfw/{{c.id}}','mark2-{{c.id}}','unmark2-{{c.id}}')">
|
|
<i class="fas fa-eye-evil fa-fw mr-4"></i>Unmark +18
|
|
</button>
|
|
</li>
|
|
{% endif %}
|
|
{% if v and (c.post and v.admin_level == 6) %}
|
|
{% if c.author_id != v.id %}
|
|
<li id="ban2-{{c.id}}" class="{% if c.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('/comment/{{c.id}}', '{{ c.author.id }}', '{{c.author.username}}')">
|
|
<i class="fas fa-user-minus fa-fw mr-4"></i>Ban user
|
|
</button>
|
|
</li>
|
|
|
|
<li id="unban2-{{c.id}}" class="{% if not c.author.is_suspended %}hidden{% endif %}">
|
|
<button class="btn btn-gray w-full text-left" onclick="post_toast2('/unban_user/{{c.author_id}}','ban2-{{c.id}}','unban2-{{c.id}}')">
|
|
<i class="fas fa-user-minus fa-fw mr-4"></i>Unban user
|
|
</button>
|
|
</li>
|
|
{% endif %}
|
|
{% endif %}
|
|
</ul>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div> |