lib.itmens/journal/templates/action_delete_post.html
2024-06-20 21:47:09 -04:00

14 lines
647 B
HTML

{% load i18n %}
<span>
<a hx-post="{% url 'journal:post_delete' post.pk %}"
hx-swap="outerHTML"
hx-trigger="click once"
{% if post.piece %} hx-confirm="‼️ {% trans "Are you sure to delete this post and the mark or note related with it?" %}" {% elif parent_post %} hx-confirm="{% trans "Are you sure to delete this reply?" %}" {% else %} hx-confirm="{% trans "Are you sure to delete this post?" %}" {% endif %}
hx-target="#replies_{{ parent_post.pk }}">
{% if post.piece %}
<!--i class="fa-regular fa-trash-can"></i -->
{% else %}
<i class="fa-regular fa-trash-can"></i>
{% endif %}
</a>
</span>