{% extends 'layout/base.html' %}

{% set show_side_menu = self.side_menu() or self.display_view_button() %}
{% set show_banner_area = self.display_view_button() or self.banner_title() or self.banner_actions() %}

{% block page %}
    {% if show_banner_area %}
        <div class="layout-side-menu">
            {% if show_side_menu %}
                <div class="menu-column">
                    {% block display_view_button %}{% endblock %}
                </div>
            {% endif %}
            {% block banner %}
                <div class="content-column">
                    <div class="banner {% block banner_class %}{% endblock %}">
                        <div class="title">
                            {% block banner_title %}{% endblock %}
                        </div>
                        <div class="action-menu">
                            {% block banner_actions %}{% endblock %}
                        </div>
                    </div>
                </div>
            {% endblock %}
        </div>
    {% endif %}
    <div class="layout-side-menu">
        {% if show_side_menu %}
            <div class="menu-column">
                {% block side_menu %}{% endblock %}
            </div>
        {% endif %}
        <div class="content-column">
            {% block before_page %}{% endblock %}
            {% block flashed_messages %}
                {%- include 'flashed_messages.html' -%}
            {% endblock %}
            {{ super() }}
        </div>
    </div>
{% endblock page %}
