{% extends "admin/change_list.html" %}
{% load admin_urls static kmuhelper_tags %}

{% block title %}{{ title }} | KMUHelper{% endblock %}

{% block breadcrumbs %}
    {% get_admin_module as module %}
    {% get_admin_model as model %}

    <div class="breadcrumbs">
        <a href="{% url module.viewname %}">KMUHelper {{ module.title }}</a>
        &rsaquo; {{ model.ADMIN_TITLE | default:cl.opts.verbose_name_plural }}
    </div>
{% endblock %}

{% block branding %}
    {% kmuhelper_branding %}
{% endblock %}

{% block extrastyle %}
    {{ block.super }}
    <link rel="stylesheet" href="{% static 'admin/kmuhelper/css/style.css' %}">
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v6.5.2/css/all.css"
          integrity="sha384-PPIZEGYM1v8zp5Py7UjFb79S58UeqCL9pYVnVPURKEqvioPROaVAJKKLzvH2rDnI" crossorigin="anonymous">
{% endblock %}

{% block extrahead %}
    {{ block.super }}
    {% include "kmuhelper/_includes/pwa_head.html" %}

    {% comment %} Add a custom blur function (for documentation screenshots) {% endcomment %}
    <script>
        function blur() {
            var $ = django.jQuery;

            $(".results td").css({"color": "transparent", "text-shadow": "0 0 6.5px rgba(0,0,0,0.55)"})
        }
    </script>
    {% comment %} Load the beforeunload script {% endcomment %}
    <script src="{% static 'admin/kmuhelper/js/beforeunload.js' %}" type="text/javascript"></script>
{% endblock %}

{% block object-tools-items %}
    <!-- SweetAlert -->
    <script src="https://unpkg.com/sweetalert@2.1.2/dist/sweetalert.min.js"
            integrity="sha384-RIQuldGV8mnjGdob13cay/K1AJa+LR7VKHqSXrrB5DPGryn4pMUXRLh92Ev8KlGF"
            crossorigin="anonymous"></script>
    <script>
        function woocommerce_loading_swal() {
            swal({
                title: "Bitte warten...",
                text: "Dieser Prozess kann unter Umständen etwas dauern.\n\nBitte versuche nicht, diesen Prozess abzubrechen!\n\nFalls du eine Fehlermeldung erhältst, lade bitte die Seite neu!\n\n(Dies könnte je nach Menge auch mehrmals der Fall sein.)",
                icon: "info",
                buttons: false,
                closeOnClickOutside: false,
                closeOnEsc: false
            });
        }
    </script>

    {{ block.super }}
{% endblock %}

{% block content %}
    {% block pageinfo %}
    {% endblock %}

    {{ block.super }}
{% endblock %}
