2024-03-15 19:41:13 +11:00
< div class = "mb4" hx-target = "this" hx-swap = "outerHTML" >
< div class = "mb2" >
< strong > {% if comment.attribute_to %}{{ comment.attribute_to }}{% else %}{{ comment.user }}{% endif %} — {{ comment.time }}< / strong >
2024-03-21 11:51:57 +11:00
{% if request.user == comment.user or perms.usethesource.change_comment %}
2024-03-15 19:41:13 +11:00
< a href = "#" class = "f7 white bg-light-silver ph2" hx-get = "{% url 'usethesource:edit_comment' comment_id=comment.id %}" > edit< / a >
2024-03-21 11:51:57 +11:00
{% endif %}
{% if request.user == comment.user or perms.usethesource.delete_comment %}
2024-03-15 19:41:13 +11:00
< a href = "#" class = "f7 white bg-light-red ph2" hx-delete = "{% url 'usethesource:delete_comment' comment_id=comment.id show_add='false' %}" hx-confirm = "Are you sure you want to delete this comment?" > delete< / a >
{% endif %}
< / div >
{{ comment.message|urlize|linebreaksbr }}
2023-10-24 23:55:14 +11:00
< / div >