forked from rc/aircox
feat: add error message page; improve admin ui; add missing test files
This commit is contained in:
@ -66,6 +66,8 @@ Context variables:
|
||||
{% endif %}
|
||||
</div>
|
||||
|
||||
{% if not no_actions %}
|
||||
{% block actions %}{% endblock %}
|
||||
{% endif %}
|
||||
</article>
|
||||
{% endif %}
|
||||
|
41
aircox/templates/aircox/widgets/comment_item.html
Normal file
41
aircox/templates/aircox/widgets/comment_item.html
Normal file
@ -0,0 +1,41 @@
|
||||
{% load i18n %}
|
||||
<article class="media item {% block css %}{% endblock%}">
|
||||
<div class="media-content">
|
||||
{% if request.user.is_staff %}
|
||||
<span class="float-right">
|
||||
<a href="{% url "admin:aircox_comment_change" object.pk %}"
|
||||
title="{% trans "Edit comment" %}"
|
||||
aria-label="{% trans "Edit comment" %}">
|
||||
<span class="fa fa-edit"></span>
|
||||
</a>
|
||||
<a class="has-text-danger"
|
||||
title="{% trans "Delete comment" %}"
|
||||
aria-label="{% trans "Delete comment" %}"
|
||||
href="{% url "admin:aircox_comment_delete" object.pk %}">
|
||||
<span class="fa fa-trash-alt"></span>
|
||||
</a>
|
||||
</span>
|
||||
{% endif %}
|
||||
{% if with_title %}
|
||||
<h5 class="title is-5 has-text-weight-normal">
|
||||
{% block title %}
|
||||
<a href="{{ object.get_absolute_url }}">{{ object.parent.title }}</a>
|
||||
{% endblock %}
|
||||
</h5>
|
||||
{% endif %}
|
||||
<div class="subtitle is-6 has-text-weight-light">
|
||||
{% block subtitle %}
|
||||
{% if request.user.is_staff %}
|
||||
<a href="mailto:{{ object.email }}">{{ object.nickname }}</a>
|
||||
{% else %}
|
||||
{{ object.nickname }}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
—
|
||||
{{ object.date }}
|
||||
</div>
|
||||
<div class="headline">
|
||||
{% block headline %}{{ object.content }}{% endblock %}
|
||||
</div>
|
||||
</div>
|
||||
</article>
|
Reference in New Issue
Block a user