{% extends "wagtailadmin/base.html" %}
{% load i18n wagtailadmin_tags %}
{% block titletag %}{% blocktrans with title=page.title %}Delete {{ title }}{% endblocktrans %}{% endblock %}

{% block content %}
    {% trans "Delete" as del_str %}
    {% include "wagtailadmin/shared/header.html" with title=del_str subtitle=page.title icon="doc-empty-inverse" %}

    <div class="nice-padding">
        <p>
            {% trans 'Are you sure you want to delete this page?' %}
            {% if descendant_count %}
                {% blocktrans count counter=descendant_count %}
                    This will also delete one more subpage.
                {% plural %}
                    This will also delete {{ descendant_count }} more subpages.
                {% endblocktrans %}
            {% endif %}
        </p>
        {% page_permissions page as page_perms %}
        {% if page_perms.can_unpublish %}
            <p>{% trans "Alternatively you can unpublish the page. This removes the page from public view and you can edit or publish it again later." %}</p>
        {% endif %}
        <form action="{% url 'wagtailadmin_pages:delete' page.id %}" method="POST">
            {% csrf_token %}
            <input type="submit" value="{% trans 'Delete it' %}" class="serious {% if page.live %}button-secondary{% endif %}"> {% if page_perms.can_unpublish %}<a href="{% url 'wagtailadmin_pages:unpublish' page.id %}" class="button">{% trans 'Unpublish it' %}</a>{% endif %}
        </form>
    </div>
{% endblock %}
