{% extends "shatailadmin/base.html" %} {% load shatailadmin_tags i18n %} {% block titletag %} {% if objects|length == 1 %} {% blocktrans trimmed with snippet_type_name=model_opts.verbose_name %}Delete {{ snippet_type_name }}{% endblocktrans %} - {{ objects|first
}} {% else %} {{ objects|length }} {{ model_opts.verbose_name_plural|capfirst }} {% endif %} {% endblock %} {% block content %} {% trans "Delete " as delete_str %} {% if objects|length == 1 %} {% include "shatailadmin/shared/header.html" with title=delete_str
subtitle=objects|first icon="snippet" only %} {% else %} {% include "shatailadmin/shared/header.html" with title=delete_str subtitle=model_opts.verbose_name_plural|capfirst icon="snippet" only %} {% endif %}

<div class="nice-padding">
    {% if objects|length == 1 %} {% usage_count_enabled as uc_enabled %} {% if uc_enabled %}
    <div class="usagecount">
        <a href="{{ objects.0.usage_url }}">{% blocktrans trimmed count usage_count=objects.0.get_usage.count %}Used {{ usage_count }} time{% plural %}Used {{ usage_count }} times{% endblocktrans %}</a>
    </div>
    {% endif %}
    <p>{% blocktrans trimmed with snippet_type_name=model_opts.verbose_name %}Are you sure you want to delete this {{ snippet_type_name }}?{% endblocktrans %}</p>
    {% else %}
    <p>{% blocktrans trimmed with snippet_type_name=model_opts.verbose_name_plural count=objects|length %}Are you sure you want to delete {{ count }} {{ snippet_type_name }}?{% endblocktrans %}</p>
    <ul>
        {% for instance in objects %}
        <li>{{ instance }}</li>
        {% endfor %}
    </ul>
    {% endif %}
    <form action="{{ action_url }}" method="POST">
        {% csrf_token %}
        <input type="submit" value="{% trans 'Yes, delete' %}" class="button serious" />
        <a href="{% if next %}{{ next }}{% else %}{% url 'shatailsnippets:list' model_opts.app_label model_opts.model_name %}{% endif %}" class="button button-secondary">{% trans "No, don't delete" %}</a>
    </form>
</div>

{% endblock %}