rDrama/files/templates/submission/SubmissionActions.html

69 lines
2.5 KiB
HTML

<ul class="flex items-center space-x-5 text-sm text-gray-500 mb-0">
{% if p.realbody(v) and '/post/' not in request.full_path %}
<li>
<button class="hover:text-gray-400" onclick="expandText('{{p.id}}')">
<i class="fas fa-expand-alt fa-fw text-expand-icon-{{p.id}}"></i>
</button>
</li>
{% endif %}
{% if '/post/' not in request.full_path %}
<li>
<a {% if v %}href="{{p.permalink}}"{% else %}href="/logged_out{{p.permalink}}"{% endif %} class="text-gray-500 hover:text-gray-400">
<i class="fas fa-comment-dots fa-fw mr-2"></i>{{ p.comment_count }} comment{{ '' if p.comment_count == 1 else 's' }}
<span class="text-info hidden new-comments"></span>
</a>
</li>
{% endif %}
{% if '/post/' not in request.full_path %}
<li>
<span>
<i class="fas fa-eye fa-fw mr-2"></i>{{ p.views }}
</span>
</li>
{% endif %}
{% 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 class="hidden md:inline-block">
<button class="hover:text-gray-400" onclick="togglePostEdit('{{p.id}}')">
<i class="fas fa-pencil fa-fw mr-2"></i>Edit
</button>
</li>
{% endif %}
{% if v and v.id==p.author_id %}
{% if p.private %}
<li class="hidden md:inline-block">
<button class="hover:text-gray-400" onclick="post_toast('/publish/{{p.id}}')">
<i class="fas fa-globe fa-fw mr-2"></i>Publish
</button>
</li>
{% endif %}
{% endif %}
{% if v %}
<li class="hidden md:inline-block">
<button class="hover:text-gray-400" data-bs-toggle="modal" data-bs-target="#awardModal" onclick="awardModal('/post/{{p.id}}/awards')">
<i class="fas fa-gift fa-fw mr-2"></i>Gift Award
</button>
</li>
<li id="subscribe-{{p.id}}" class="{% if p.id in v.subscribed_idlist() %}hidden{% endif %}">
<button class="hover:text-gray-400" onclick="post_toast2('/subscribe/{{p.id}}','subscribe-{{p.id}}','unsubscribe-{{p.id}}')">
<i class="fas fa-bell fa-fw mr-2"></i>Subscribe
</button>
</li>
<li id="unsubscribe-{{p.id}}" class="{% if p.id not in v.subscribed_idlist() %}hidden{% endif %}">
<button class="hover:text-gray-400" onclick="post_toast2('/unsubscribe/{{p.id}}','subscribe-{{p.id}}','unsubscribe-{{p.id}}')">
<i class="fas fa-bell-slash fa-fw mr-2"></i>Unsubscribe
</button>
</li>
{% endif %}
<!-- Does not require auth -->
<li class="hidden md:inline-block">
<a href="/votes?link={{p.fullname}}" class="text-gray-500 hover:text-gray-400">
<i class="fas fa-poll fa-fw mr-2"></i>Votes
</a>
</li>
</ul>