{% extends "wagtailadmin/base.html" %}
{% load i18n wagtailadmin_tags %}
{% block titletag %}{% trans "Delete reference" %}{% endblock %}

{% block content %}
    {% trans "Delete reference" as del_str %}
    {% include "wagtailadmin/shared/header.html" with title=del_str icon="list-ol" %}

    <div class="row row-flush nice-padding">
        <div class="col6">
            {{ reference.bibtex }}
        </div>
        <div class="col6">
            {% usage_count_enabled as uc_enabled %}
            {% if uc_enabled %}
                <div class="usagecount">
                    <a href="{{ reference.usage_url }}">{% blocktrans count usage_count=reference.get_usage.count %}Used {{ usage_count }} time{% plural %}Used {{ usage_count }} times{% endblocktrans %}</a>
                </div>
            {% endif %}
            <p>{% trans "Are you sure you want to delete this reference?" %}</p>
            <form action="{% url 'wagtailreferences:delete' reference.id %}" method="POST">
                {% csrf_token %}
                <input type="submit" value="{% trans 'Yes, delete' %}" class="button serious" />
            </form>
        </div>
    </div>
{% endblock %}
