{% extends "shatailadmin/admin_base.html" %}

{% load shatailadmin_tags shatailcore_tags i18n %}

{% block furniture %}
<template data-shatail-sidebar-branding-logo>
  {% block branding_logo %}{% endblock %}
</template>

{% sidebar_props %}
<aside id="shatail-sidebar" data-shatail-sidebar></aside>

<main class="content-wrapper" id="main">
    <div class="content">
        {# Always show messages div so it can be appended to by JS #}
        <div class="messages">
            {% if messages %}
            <ul>
                {% for message in messages %} {% message_level_tag message as level_tag %}
                <li class="{% message_tags message %}">
                    {% if level_tag == "error" %} {# There is no error icon, use warning icon instead #} {% icon name="warning" class_name="messages-icon" %} {% elif message.extra_tags == "lock" %} {% icon name="lock" class_name="messages-icon" %} {% elif message.extra_tags
                    == "unlock" %} {% icon name="lock-open" class_name="messages-icon" %} {% else %} {% icon name=level_tag class_name="messages-icon" %} {% endif %} {{ message|safe }}
                </li>
                {% endfor %}
            </ul>
            {% endif %}
        </div>

        {% block content %}{% endblock %}
    </div>
</main>
{% endblock %}
