{# This file is part of the Sonata package. (c) Thomas Rabaix For the full copyright and license information, please view the LICENSE file that was distributed with this source code. #} {% set _preview = block('preview') is defined ? block('preview')|trim : null %} {% set _form = block('form') is defined ? block('form')|trim : null %} {% set _show = block('show') is defined ? block('show')|trim : null %} {% set _list_table = block('list_table') is defined ? block('list_table')|trim : null %} {% set _list_filters = block('list_filters') is defined ? block('list_filters')|trim : null %} {% set _tab_menu = block('tab_menu') is defined ? block('tab_menu')|trim : null %} {% set _content = block('content') is defined ? block('content')|trim : null %} {% set _title = block('title') is defined ? block('title')|trim : null %} {% set _breadcrumb = block('breadcrumb') is defined ? block('breadcrumb')|trim : null %} {% set _actions = block('actions') is defined ? block('actions')|trim : null %} {% set _navbar_title = block('navbar_title') is defined ? block('navbar_title')|trim : null %} {% set _list_filters_actions = block('list_filters_actions') is defined ? block('list_filters_actions')|trim : null %} {% block meta_tags %} {% endblock %} {% block stylesheets %} {% for stylesheet in sonata_admin.adminPool.getOption('stylesheets', []) %} {% endfor %} {% endblock %} {% block javascripts %} {% block sonata_javascript_config %} {% endblock %} {% block sonata_javascript_pool %} {% for javascript in sonata_admin.adminPool.getOption('javascripts', []) %} {% endfor %} {% endblock %} {% set locale = app.request.locale %} {# localize moment #} {% if locale[:2] != 'en' %} {% endif %} {# localize select2 #} {% if sonata_admin.adminPool.getOption('use_select2') %} {% if locale == 'pt' %}{% set locale = 'pt_PT' %}{% endif %} {# omit default EN locale #} {% if locale[:2] != 'en' %} {% endif %} {% endif %} {% endblock %} {% block sonata_head_title %} {{ 'Admin'|trans({}, 'SonataAdminBundle') }} {% if _title is not empty %} {{ _title|raw }} {% else %} {% if action is defined %} - {% for menu in breadcrumbs_builder.breadcrumbs(admin, action) %} {% if not loop.first %} {% if loop.index != 2 %} > {% endif %} {%- set translation_domain = menu.extra('translation_domain', 'messages') -%} {%- set label = menu.label -%} {%- if translation_domain is not same as(false) -%} {%- set label = label|trans(menu.extra('translation_params', {}), translation_domain) -%} {%- endif -%} {{ label }} {% endif %} {% endfor %} {% endif %} {% endif %} {% endblock %}
{% block sonata_header %}
{% block sonata_header_noscript_warning %} {% endblock %} {% block logo %} {% spaceless %} {% endspaceless %} {% endblock %} {% block sonata_nav %} {% endblock sonata_nav %}
{% endblock sonata_header %} {% block sonata_wrapper %} {% block sonata_left_side %} {% endblock sonata_left_side %}
{% block sonata_page_content %}
{% block sonata_page_content_header %} {% block sonata_page_content_nav %} {% if _tab_menu is not empty or _actions is not empty or _list_filters_actions is not empty %} {% endif %} {% endblock sonata_page_content_nav %} {% endblock sonata_page_content_header %}
{% block sonata_admin_content %} {% block notice %} {% include 'SonataCoreBundle:FlashMessage:render.html.twig' %} {% endblock notice %} {% if _preview is not empty %}
{{ _preview|raw }}
{% endif %} {% if _content is not empty %}
{{ _content|raw }}
{% endif %} {% if _show is not empty %}
{{ _show|raw }}
{% endif %} {% if _form is not empty %}
{{ _form|raw }}
{% endif %} {% if _list_filters is not empty %}
{{ _list_filters|raw }}
{% endif %} {% if _list_table is not empty %}
{{ _list_table|raw }}
{% endif %} {% endblock sonata_admin_content %}
{% endblock sonata_page_content %}
{% endblock sonata_wrapper %}
{% if sonata_admin.adminPool.getOption('use_bootlint') %} {% block bootlint %} {# Bootlint - https://github.com/twbs/bootlint#in-the-browser #} {% endblock %} {% endif %}