{% extends 'admin/kmuhelper/change_form.html' %}

{% block object-tools-items %}
    {% if change %}
        <li><a target="_blank" href="{{ original.get_url }}">Öffentliche URL</a></li>
        <li><a href="{% url 'admin:kmuhelper_email_preview' object_id %}">Vorschau</a></li>
        {% if perms.kmuhelper.send_email %}
            {% if not original.sent %}
                <li><a href="{% url 'admin:kmuhelper_email_send' object_id %}">Senden</a></li>
            {% else %}
                <li><a href="{% url 'admin:kmuhelper_email_resend' object_id %}">Erneut senden</a></li>
            {% endif %}
        {% endif %}
    {% endif %}
    {{ block.super }}
{% endblock %}
