rDrama/files/templates/CHRISTMAS/sidebars/SubmissionSidebar.html

225 lines
8.9 KiB
HTML

<div class="sidebar hidden xl:block xl:col-start-10 xl:col-end-13 flex flex-col flex-shrink-0 py-4">
<div>
<h2 class="ml-2 font-bold text-lg font-heading leading-normal mb-2">
Awards
</h2>
<!-- Give awards if none -->
{% if not p.awards %}
<p class="text-sm text-gray-500">No awards gifted yet...</p>
<button class="text-sm text-primary hover:underline" data-bs-toggle="modal" data-bs-target="#awardModal" onclick="awardModal('/post/{{p.id}}/awards')">
Gift award
</button>
{% endif %}
<!-- Icons -->
<ul class="flex flex-wrap gap-3 items-center">
<!-- Awards -->
{% if p.awards %}
{% for a in p.awards %}
<li>
<i class="{{a.class_list}} fa-sm fa-fw" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="{{a.title}} Award given by @{{a.user.username}}"></i>
</li>
{% endfor %}
{% endif %}
</ul>
</div>
<hr class="mt-6 mb-5 h-0.5 border-b border-gray-300 dark:border-gray-900 shadow-inset-t-white-05"/>
<div>
<h2 class="ml-2 font-bold text-lg font-heading leading-normal mb-2">
Link
</h2>
<input type="text" onclick="this.select()" value="https://rdrama.net/post/{{ p.id }}" class="m-0.5 p-0.5 bg-white border border-gray-300 text-xs text-black w-44">
</div>
<hr class="mt-6 mb-5 h-0.5 border-b border-gray-300 dark:border-gray-900 shadow-inset-t-white-05"/>
<div>
<h2 class="ml-2 font-bold text-lg font-heading leading-normal mb-2">
Share Post
</h2>
<div class="flex flex-wrap items-center space-x-2">
<a class="leading-4 text-gray-400 hover:text-gray-300" href="javascript:void(0)" onclick="window.location.href='https://www.reddit.com/submit?url='+ encodeURIComponent(window.location.href)+'&title='+document.title;">
<img src="/assets/CHRISTMAS/images/icons/reddit.gif" class="w-7 h-7 object-contain" alt="Share this post on Reddit"/>
</a>
<a class="leading-4 text-gray-400 hover:text-gray-300" href="javascript:void(0)" onclick="window.location.href='https://twitter.com/share?url='+ encodeURIComponent(window.location.href)+'&text='+document.title;">
<img src="/assets/CHRISTMAS/images/icons/twitter.gif" class="w-7 h-7 object-contain" alt="Share this post on Twitter"/>
</a>
</div>
</div>
<hr class="mt-6 mb-5 h-0.5 border-b border-gray-300 dark:border-gray-900 shadow-inset-t-white-05"/>
<div>
<h2 class="ml-2 font-bold text-lg font-heading leading-normal mb-2">
DramaMetricâ„¢
</h2>
<ul class="flex flex-col space-y-1 text-gray-500">
<li>
<p class="text-sm">
<strong>{{ p.views }}</strong> {{ 'view' if p.views == 1 else 'views' }} on this post
</p>
</li>
<li>
<p class="text-sm">
<a href="/votes?link={{p.fullname}}" class="font-bold text-primary hover:underline">
{{ ups + downs }}
</a>
{{ 'vote' if ups + downs == 1 else 'votes' }} on this post
</p>
</li>
{% if p.awards|length > 1 %}
<li>
<p class="text-sm">
<strong>{{ p.awards|length }}</strong> {{ 'award' if p.awards.length == 1 else 'awards' }} gifted
</p>
</li>
{% endif %}
</ul>
<ul class="flex flex-col space-y-1 mb-0">
<!-- Flair -->
{% if p.flair %}
<li>
<span class="badge badge-purple">
{{p.flair | safe}}
</span>
</li>
{% endif %}
<!-- NSFW -->
{% if p.over_18 %}
<li>
<span class="badge badge-red">+18</span>
</li>
{% endif %}
<!-- Country Club -->
{% if p.club %}
<li>
<span class="badge badge-yellow">Country Club</span>
</li>
{% endif %}
{% if p.stickied and p.stickied.startswith('t:') %}
<li>
<span id="pinned-{{p.id}}-sidebar" class="badge badge-pink" data-bs-toggle="tooltip" data-bs-placement="bottom" data-timestamp={{p.stickied[2:]}} onmouseover="pinned_timestamp(this.id)"}>
<i class="fas fa-thumbtack fa-rotate--45 fa-sm fa-fw"></i>
Pinned
</span>
</li>
{% elif p.stickied %}
<li>
<span id="pinned-{{p.id}}" class="badge badge-pink" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="Pinned by @{{p.stickied}}">
<i class="fas fa-thumbtack fa-rotate--45 fa-sm fa-fw"></i>
Pinned
</span>
</li>
{% endif %}
<!-- Pinned -->
{% if p.is_pinned %}
<li>
<span class="badge badge-green">
<i class="fas fa-thumbtack fa-rotate--45 fa-sm fa-fw"></i>
Pinned to profile
</span>
</li>
{% endif %}
<!-- Private -->
{% if p.private %}
<li>
<span class="badge badge-blue">
<i class="fas fa-lock-alt fa-sm fa-fw"></i>
Draft
</span>
</li>
{% endif %}
<!-- Reports -->
{% if p.active_flags %}
<li>
<button class="badge badge-red" onclick="document.getElementById('flaggers-{{p.id}}').classList.toggle('hidden')">
<i class="fas fa-gavel fa-sm fa-fw"></i>
{{p.active_flags}} Reports
</button>
</li>
{% endif %}
</ul>
</div>
{% if v and v.admin_level > 1 %}
<hr class="mt-6 mb-5 h-0.5 border-b border-gray-300 dark:border-gray-900 shadow-inset-t-white-05"/>
<div class="relative my-4 px-4 py-3 rounded-md border border-yellow-400 dark:border-gray-700 bg-yellow-100 dark:bg-gray-700/40">
<span class="absolute top-2 right-3 text-base">
<i class="fas fa-crown fa-sm text-yellow-400 dark:text-gray-300" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="Visible only to moderators"></i>
</span>
<h2 class="ml-2 font-bold text-lg font-heading leading-normal mb-2">
Manage Post
</h2>
<ul class="flex flex-col mt-3 mb-0 space-y-6">
<li>
<div class="label text-black dark:text-gray-200">Attributes</div>
<ul class="flex flex-col mb-0 space-y-3">
<li class="flex space-x-2">
<input type="checkbox" value="verify" class="w-5 h-5" onchange="checkboxSticky(this,'{{p.id}}')" {% if p.stickied %}checked{% endif %}>
<div>
<label class="label mb-0" for="verify">Pinned</label>
<small class="block text-gray-600 dark:text-gray-400">
Pin this thread to the top of the frontpage
</small>
</div>
</li>
<li class="flex space-x-2">
<input type="checkbox" value="club" class="w-5 h-5" onchange="checkboxClub(this,'{{p.id}}')" {% if p.club %}checked{% endif %}>
<div>
<label class="label mb-0" for="club">Country Club</label>
<small class="block text-gray-600 dark:text-gray-400">
Require Country Club membership to view this thread
</small>
</div>
</li>
<li class="flex space-x-2">
<input type="checkbox" value="club" class="w-5 h-5" onchange="checkboxNSFW(this,'{{p.id}}')" {% if p.over_18 %}checked{% endif %}>
<div>
<label class="label mb-0" for="club">18+</label>
<small class="block text-gray-600 dark:text-gray-400">
Mark this thread as 18+
</small>
</div>
</li>
</ul>
</li>
</ul>
</div>
{% if v.id != p.author_id %}
<div class="relative my-4 px-4 py-3 rounded-md border border-red-300 dark:border-gray-700 bg-red-100 dark:bg-gray-700/40 group">
<span class="absolute top-2 right-3 text-base">
<i class="fas fa-exclamation-triangle fa-sm text-red-400 dark:text-gray-300 group-hover:animate-pulse" data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-original-title="Visible only to moderators. Recommend internal mod discussion before making changes here."></i>
</span>
<h2 class="ml-2 font-bold text-lg font-heading leading-normal mb-2">
Danger Zone
</h2>
<ul class="flex flex-col mt-3 mb-0 space-y-6">
<li>
<div class="label text-black dark:text-gray-200">Post visibility</div>
<div id="sidebar-remove-{{p.id}}" class="{% if p.is_banned %}hidden{% endif %}">
<button class="btn btn-red w-full" onclick="post_toast2('/ban_post/{{p.id}}','sidebar-remove-{{p.id}}','sidebar-approve-{{p.id}}')">
<i class="fas fa-ban fa-sm fa-fw mr-2"></i>
Remove post
</button>
</div>
<div id="sidebar-approve-{{p.id}}" class="{% if not p.is_banned %}hidden{% endif %}">
<button class="btn btn-green w-full" onclick="post_toast2('/unban_post/{{p.id}}','sidebar-remove-{{p.id}}','sidebar-approve-{{p.id}}')">
<i class="fas fa-check fa-sm fa-fw mr-2"></i>
Approve post
</button>
</div>
</li>
<li>
<div class="label text-black dark:text-gray-200">Manage author</div>
<div id="sidebar-ban-{{p.id}}" class="{% if p.author.is_suspended %}hidden{% endif %} text-red-600">
<button class="btn btn-red w-full" 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-2"></i>
Ban user
</button>
</div>
<div id="sidebar-unban-{{p.id}}" class="{% if not p.author.is_suspended %}hidden{% endif %}">
<button class="btn btn-green w-full" onclick="post_toast2('/unban_user/{{p.author_id}}','sidebar-ban-{{p.id}}','sidebar-unban-{{p.id}}')">
<i class="fas fa-user-check fa-sm fa-fw mr-2"></i>
Unban user
</button>
</div>
</li>
</ul>
</div>
{% endif %}
{% endif %}
</div>