remotes/1693045480750635534/spooky-22
kek7198 2021-12-05 16:15:00 -06:00
parent 06736a2c31
commit fa0c7842c4
1 changed files with 49 additions and 13 deletions

View File

@ -8,33 +8,69 @@
</button>
</div>
<div class="modal-body">
<ul class="list-group post-actions">
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#reportPostModal" onclick="report_postModal('{{p.id}}')"><i class="far fa-flag text-center text-muted mr-3"></i>Report</button>
<ul class="flex flex-col">
<li>
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#reportPostModal" onclick="report_postModal('{{p.id}}')">
<i class="far fa-flag text-center text-muted mr-3"></i>Report
</button>
</li>
{% if v and v.id==p.author_id %}
{% if p.private %}
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" href="javascript:void(0)" onclick="post_toast('/publish/{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-globe text-center text-muted mr-3"></i>Publish</button>
<li>
<button class="btn btn-gray" onclick="post_toast('/publish/{{p.id}}')" data-bs-dismiss="modal">
<i class="fas fa-globe fa-fw mr-2"></i>Publish
</button>
</li>
{% endif %}
<button id="pin-profile2-{{p.id}}" class="{% if p.is_pinned %}hidden{% endif %} nobackground btn btn-link btn-block btn-lg text-muted text-left"href="javascript:void(0)" onclick="post_toast2('/pin/{{p.id}}','pin-profile2-{{p.id}}','unpin-profile2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center mr-3"></i>Pin to profile</button>
<button id="unpin-profile2-{{p.id}}" class="{% if not p.is_pinned %}hidden{% endif %} nobackground btn btn-link btn-block btn-lg text-muted text-left" href="javascript:void(0)" onclick="post_toast2('/pin/{{p.id}}','pin-profile2-{{p.id}}','unpin-profile2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-thumbtack fa-rotate--45 text-center mr-3"></i>Unpin from profile</button>
<li id="pin-profile2-{{p.id}}" class="{% if p.is_pinned %}hidden{% endif %}">
<button class="btn btn-gray" 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-2"></i>Pin to profile
</button>
</li>
<li id="unpin-profile2-{{p.id}}" class="{% if not p.is_pinned %}hidden{% endif %}">
<button class="nobackground btn btn-link btn-block btn-lg text-muted 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-2"></i>Unpin from profile
</button>
</li>
{% if p.deleted_utc > 0 %}
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" href="javascript:void(0)" onclick="post_toast('/undelete_post/{{p.id}}')" data-bs-dismiss="modal"><i class="far fa-trash-alt text-center text-muted mr-3"></i>Undelete</button>
<li>
<button class="btn btn-gray" onclick="post_toast('/undelete_post/{{p.id}}')" data-bs-dismiss="modal">
<i class="far fa-trash-alt text-center text-muted mr-3"></i>Undelete
</button>
</li>
{% else %}
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#deletePostModal" onclick="delete_postModal('{{p.id}}')"><i class="far fa-trash-alt text-center text-muted mr-3"></i>Delete</button>
<li>
<button class="btn btn-gray" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#deletePostModal" onclick="delete_postModal('{{p.id}}')">
<i class="far fa-trash-alt fa-fw mr-2"></i>Delete
</button>
</li>
{% endif %}
{% endif %}
<a class="btn-block" href="/votes?link={{p.fullname}}"><button class="nobackground btn btn-link btn-block btn-lg text-left text-muted"><i class="fas fa-arrows-v text-center text-muted mr-3"></i>Votes</button></a>
<li>
<a class="btn btn-gray" href="/votes?link={{p.fullname}}">
<i class="fas fa-arrows-v fa-fw mr-2"></i>Votes
</a>
</li>
{% if v %}
<button class="nobackground btn btn-link btn-block btn-lg text-left text-muted" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#awardModal" onclick="awardModal('/post/{{p.id}}/awards')"><i class="fas fa-gift text-center text-muted mr-3"></i>Give Award</button>
<li>
<button class="btn btn-gray" data-bs-toggle="modal" data-bs-dismiss="modal" data-bs-target="#awardModal" onclick="awardModal('/post/{{p.id}}/awards')"><i class="fas fa-gift fa-fw mr-2"></i>Give Award</button>
</li>
{% endif %}
{% if v %}
<button id="subscribe2-{{p.id}}" class="{% if p.id in v.subscribed_idlist() %}hidden{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" href="javascript:void(0)" onclick="post_toast2('/subscribe/{{p.id}}','subscribe2-{{p.id}}','unsubscribe2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye text-center text-muted mr-3"></i>Subscribe</button>
<li id="subscribe2-{{p.id}}" class="{% if p.id in v.subscribed_idlist() %}hidden{% endif %}">
<button class="btn btn-gray" onclick="post_toast2('/subscribe/{{p.id}}','subscribe2-{{p.id}}','unsubscribe2-{{p.id}}')">
<i class="fas fa-eye fa-fw mr-2"></i>Subscribe
</button>
</li>
<button id="unsubscribe2-{{p.id}}" class="{% if not p.id in v.subscribed_idlist() %}hidden{% endif %} nobackground btn btn-link btn-block btn-lg text-left text-muted" href="javascript:void(0)" onclick="post_toast2('/unsubscribe/{{p.id}}','subscribe2-{{p.id}}','unsubscribe2-{{p.id}}')" data-bs-dismiss="modal"><i class="fas fa-eye-slash text-center text-muted mr-3"></i>Unsubscribe</button>
<li id="unsubscribe2-{{p.id}}" class="{% if not p.id in v.subscribed_idlist() %}hidden{% endif %}">
<button class="btn btn-gray" onclick="post_toast2('/unsubscribe/{{p.id}}','subscribe2-{{p.id}}','unsubscribe2-{{p.id}}')">
<i class="fas fa-eye-slash fa-fw mr-2"></i>Unsubscribe
</button>
</li>
{% endif %}
{% if v %}