templates/admin/base.html.twig line 1

Open in your IDE?
  1. {% if app.request.xmlHttpRequest %}
  2.     {% set layout = '@SonataAdmin/ajax_layout.html.twig' %}
  3. {% else %}
  4.     {% set layout = '@SonataAdmin/standard_layout.html.twig' %}
  5. {% endif %}
  6. {% extends layout %}
  7. {% set config = getConfig() %} {# init config #}
  8. {% block stylesheets %}
  9.     {{ parent() }}
  10.     <link rel="stylesheet" href="{{ asset('assets/vendor/datatables/media/css/dataTables.bootstrap.min.css') }}"/>
  11.     <link rel="stylesheet" href="{{ asset('assets/vendor/dropzone/dist/dropzone.css') }}"/>
  12.     {{ encore_entry_link_tags('admin') }}
  13.     <style>
  14.         {% include 'admin/core/admin.css.twig' %}
  15.         {% include 'admin/admin.css.twig' %}
  16.     </style>
  17. {% endblock stylesheets %}
  18. {% block javascripts %}
  19.     {{ parent() }}
  20.     <script src="{{ asset('assets/vendor/datatables/media/js/jquery.dataTables.min.js') }}"></script>
  21.     <script src="{{ asset('assets/vendor/datatables/media/js/dataTables.bootstrap.min.js') }}"></script>
  22.     <script src="{{ asset('assets/vendor/chart.js/dist/Chart.min.js') }}"></script>
  23.     <script src="{{ asset('assets/vendor/dropzone/dist/dropzone.js') }}"></script>
  24.     <script src="{{ asset('bundles/fosjsrouting/js/router.js') }}"></script>
  25.     <script src="{{ asset('assets/vendor/aggrid/aggrid_locale_fr.js') }}"></script>
  26.     {% if getenv('env') == 'dev' %}
  27.         <script src="{{ asset('assets/vendor/vuejs/vue.js') }}"></script>
  28.     {% else %}
  29.         <script src="{{ asset('assets/vendor/vuejs/vue.min.js') }}"></script>
  30.     {% endif %}
  31.     <script src="{{ path('fos_js_routing_js', { callback: 'fos.Router.setData' }) }}"></script>
  32.     <script>{% include 'admin/core/admin.js.twig' %}</script>
  33.     <script>{% include 'admin/admin.js.twig' %}</script>
  34.     <script>{% include 'admin/admin_vue.js.twig' %}</script>
  35.     {{ encore_entry_script_tags('admin') }}
  36. {% endblock javascripts %}
  37. {% block logo %}
  38.     <a class="logo" href="{{ path('sonata_admin_dashboard') }}">
  39. {#        <img src="{{ asset('favicon.ico') }}" alt="{{ config.name }}">#}
  40.     </a>
  41. {% endblock logo %}
  42. {% block sonata_breadcrumb %}
  43.     {{ include('admin/menu/menu_list.html.twig') }}
  44.     {{ include('admin/menu/menu_add.html.twig') }}
  45.     <ul class="nav navbar-nav">
  46.         {% block top_result %}
  47.         {% endblock %}
  48.     </ul>
  49. {% endblock %}
  50. {% block sonata_top_nav_menu %}
  51.     <div class="navbar-custom-menu navbar-right">
  52.         <ul class="nav navbar-nav">
  53.             {{ include('/admin/menu/menu_user.html.twig') }}
  54.             {% block top_result_right %}
  55.             {% endblock %}
  56.         </ul>
  57.     </div>
  58. {% endblock %}
  59.             {% block body_attributes -%}
  60.                 class="sonata-bc {% block admin_lte_skin_class %}{{ _skin }}{% endblock %} sidebar-mini sidebar-collapse
  61.                 {% if _use_select2 %}sonata-select2{% endif %}
  62.                 {% if _use_icheck %}sonata-icheck{% endif %}
  63.                 {% if app.request.cookies.get('sonata_sidebar_hide') -%}
  64.                     sidebar-collapse
  65.                 {%- endif -%}"
  66.             {%- endblock -%}
  67. {% block tab_menu_navbar_header %}
  68.     {% if admin is defined %}
  69.         <h2 class="section-title">
  70.             {% block sectionTitle %}
  71.                 {{ admin.label }}
  72.             {% endblock %}
  73.         </h2>
  74.     {% endif %}
  75. {% endblock %}
  76. {% block sonata_wrapper %}
  77.     {{ parent() }}
  78.     <div id="modal-container"></div>
  79.     {{ include('admin/control_sidebar.html.twig') }}
  80. {% endblock sonata_wrapper %}
  81. {% block sonata_sidebar_search %}{% endblock sonata_sidebar_search %}
  82. {% block side_bar_nav %}
  83.     {{ include('/admin/menu/menu_left.html.twig') }}
  84. {% endblock side_bar_nav %}
  85. {% block side_bar_after_nav %}{% endblock side_bar_after_nav %}