{% extends "wagtailadmin/base.html" %}
{% load i18n wagtailadmin_tags %}

{% block bodyclass %}modeladmin{% endblock %}

{% block titletag %}{{ view.get_meta_title }}{% endblock %}

{% block extra_css %}
    {{ block.super }}
    {{ view.media.css }}
{% endblock %}

{% block extra_js %}
    {{ block.super }}
    {{ view.media.js }}
{% endblock %}

{% block content %}

    {% block header %}
        {% include "wagtailadmin/shared/header_with_locale_selector.html" with title=view.get_page_title subtitle=view.get_page_subtitle icon=view.header_icon %}
    {% endblock %}

    <div>

        {% block content_main %}
            <div class="nice-padding">
                <p class="back">
                    <a href="{{ view.index_url }}">
                        {% icon name="arrow-left" class_name="default" %}
                        {% blocktrans trimmed with view.verbose_name as model_name %}Back to {{ model_name }} list{% endblocktrans %}
                    </a>
                </p>
                {% block fields_output %}
                    {% if fields %}
                        <dl>
                            {% for field in fields %}
                                <dt class="{{ field.type|lower }}">{{ field.label }}</dt>
                                <dd>{{ field.value }}</dd>
                            {% endfor %}
                        </dl>
                    {% endif %}
                {% endblock %}
            </div>
        {% endblock %}

    </div>

    {% block footer %}
        {% if buttons %}
            <footer class="footer">
                <div class="footer__container">
                    {% for button in buttons %}
                        {% include "modeladmin/includes/button.html" %}
                    {% endfor %}
                </div>
            </footer>
        {% endif %}
    {% endblock %}
{% endblock %}
