forked from rc/aircox
cfr #121 Co-authored-by: Christophe Siraut <d@tobald.eu.org> Co-authored-by: bkfox <thomas bkfox net> Co-authored-by: Thomas Kairos <thomas@bkfox.net> Reviewed-on: rc/aircox#131 Co-authored-by: Chris Tactic <ctactic@noreply.git.radiocampus.be> Co-committed-by: Chris Tactic <ctactic@noreply.git.radiocampus.be>
56 lines
1.3 KiB
HTML
56 lines
1.3 KiB
HTML
{% extends "./page.html" %}
|
|
{% load i18n humanize aircox %}
|
|
|
|
{% block tag-class %}{{ block.super }} comment{% endblock %}
|
|
|
|
{% block outer %}
|
|
{% with url=object.get_absolute_url %}
|
|
{% if with_title %}
|
|
{{ block.super }}
|
|
{{ block.super }}
|
|
{% else %}
|
|
{{ block.super }}
|
|
{{ block.super }}
|
|
{% endif %}
|
|
{% endwith %}
|
|
{% endblock %}
|
|
|
|
|
|
{% block title %}
|
|
{{ object.nickname }} — {{ object.date }}
|
|
{% endblock %}
|
|
|
|
{% block subtitle %}
|
|
{% if with_title %}
|
|
{{ object.parent.title }}
|
|
{% endif %}
|
|
{% endblock %}
|
|
|
|
|
|
{% block content %}{{ object.content }}{% endblock %}
|
|
|
|
{% block actions %}
|
|
{{ block.super }}
|
|
|
|
{% if admin %}
|
|
{% if user.is_staff %}
|
|
<a href="{% url "admin:aircox_comment_change" object.pk %}" class="button"
|
|
title="{% trans "Edit comment" %}"
|
|
aria-label="{% trans "Edit comment" %}">
|
|
<span class="fa fa-edit"></span>
|
|
</a>
|
|
{% endif %}
|
|
<a-action-button class="button is-danger"
|
|
title="{% trans "Delete comment" %}"
|
|
aria-label="{% trans "Delete comment" %}"
|
|
url="{% url "api:comment-detail" object.pk %}"
|
|
icon="fa fa-trash-alt"
|
|
method="delete"
|
|
confirm="{% translate "Delete comment?" %}"
|
|
@done="deleteElements('#{{ object|object_id }}')"
|
|
/>
|
|
|
|
{# <a href="mailto:{{ object.email }}">{{ object.nickname }}</a> #}
|
|
{% endif %}
|
|
{% endblock %}
|