You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

layout.html.twig 8.7KB

3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
3 年之前
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. {# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
  2. {% trans_default_domain ea.i18n.translationDomain %}
  3. <!DOCTYPE html>
  4. <html lang="{{ ea.i18n.htmlLocale }}" dir="{{ ea.i18n.textDirection }}">
  5. <head>
  6. {% block head_metas %}
  7. <meta charset="utf-8">
  8. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9. <meta name="robots"
  10. content="noindex, nofollow, noarchive, nosnippet, noodp, noimageindex, notranslate, nocache"/>
  11. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  12. <meta name="generator" content="EasyAdmin"/>
  13. {% endblock head_metas %}
  14. <title>{% block page_title %}Administration | {{ block('content_title')|striptags|raw }}{% endblock %}</title>
  15. {# {% block head_stylesheets %}
  16. <link rel="stylesheet" href="{{ asset('bundles/easyadmin/app.css') }}">
  17. {% endblock %} #}
  18. <link rel="stylesheet"
  19. href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700&amp;display=fallback">
  20. {% block configured_stylesheets %}
  21. {% for css_asset in ea.assets.cssFiles ?? [] %}
  22. <link rel="stylesheet" href="{{ asset(css_asset) }}">
  23. {% endfor %}
  24. {% for webpack_encore_entry in ea.assets.webpackEncoreAssets ?? [] %}
  25. {{ ea_call_function_if_exists('encore_entry_link_tags', webpack_encore_entry) }}
  26. {% endfor %}
  27. {% endblock %}
  28. {% block head_favicon %}
  29. <link rel="shortcut icon" href="{{ asset(ea.dashboardFaviconPath) }}">
  30. {% endblock %}
  31. {# {% block head_javascript %}
  32. <script src="{{ asset('bundles/easyadmin/app.js') }}"></script>
  33. {% endblock head_javascript %} #}
  34. {# {% if 'rtl' == ea.i18n.textDirection %}
  35. <link rel="stylesheet" href="{{ asset('bundles/easyadmin/app.rtl.css') }}">
  36. <link rel="stylesheet" href="{{ asset('bundles/easyadmin/app-custom-rtl.css') }}">
  37. {% endif %} #}
  38. {% block configured_head_contents %}
  39. {% for htmlContent in ea.assets.headContents ?? [] %}
  40. {{ htmlContent|raw }}
  41. {% endfor %}
  42. {% endblock %}
  43. </head>
  44. {% block body %}
  45. <body id="{% block body_id %}{% endblock %}"
  46. class="admin sidebar-mini layout-fixed {% block body_class %}{% endblock %}">
  47. {% block javascript_page_layout %}
  48. <script>
  49. document.body.classList.add(
  50. 'ea-content-width-' + (localStorage.getItem('ea/content/width') || '{{ ea.crud.contentWidth ?? ea.dashboardContentWidth ?? 'normal' }}'),
  51. 'ea-sidebar-width-' + (localStorage.getItem('ea/sidebar/width') || '{{ ea.crud.sidebarWidth ?? ea.dashboardSidebarWidth ?? 'normal' }}')
  52. );
  53. </script>
  54. {% endblock javascript_page_layout %}
  55. {% block wrapper_wrapper %}
  56. {% block flash_messages %}
  57. {{ include(ea.templatePath('flash_messages')) }}
  58. {% endblock flash_messages %}
  59. <div class="wrapper">
  60. {% block wrapper %}
  61. {% block navbar_header %}
  62. {{ include('@LcSov/adminlte/block/navbar_header.html.twig') }}
  63. {% endblock %}
  64. <aside class="main-sidebar sidebar-dark-primary elevation-4">
  65. {% block sidebar %}
  66. {% block header_logo %}
  67. <a class="brand-link text-center"
  68. title="{{ ea.dashboardTitle|striptags }}"
  69. href="{{ path(ea.dashboardRouteName) }}">
  70. {{ ea.dashboardTitle|raw }}
  71. <!--<span class="brand-text font-weight-light">Texte logo</span>-->
  72. </a>
  73. {% endblock header_logo %}
  74. <div class="sidebar">
  75. {% block main_menu_wrapper %}
  76. {{ include(ea.templatePath('main_menu')) }}
  77. {% endblock main_menu_wrapper %}
  78. </div>
  79. {% endblock sidebar %}
  80. </aside>
  81. <div class="content-wrapper" style="min-height: 554px;">
  82. {% block content %}
  83. {% block content_header_wrapper %}
  84. <section class="content-header">
  85. <div class="container-fluid">
  86. <div class="row mb-2">
  87. {% set has_help_message = (ea.crud.helpMessage ?? '') is not empty %}
  88. {% block content_header %}
  89. <div class="col-sm-6">
  90. <h1 class="m-0 text-dark">
  91. {% block content_title %}{% endblock %}
  92. </h1>
  93. {% block content_breadcrumb %}
  94. {% endblock content_breadcrumb %}
  95. {# {% block content_help %}
  96. {% if has_help_message %}
  97. <div class="text-muted">
  98. {{ ea.crud.helpMessage|e('html_attr') }}
  99. </div>
  100. {% endif %}
  101. {% endblock %} #}
  102. </div><!-- /.col -->
  103. <div class="col-sm-6">
  104. {% block page_actions_wrapper %}
  105. <div class="btn-list float-sm-right">
  106. {% block page_actions %}{% endblock %}
  107. </div>
  108. {% endblock %}
  109. </div><!-- /.col -->
  110. {% endblock %}
  111. </div><!-- /.row -->
  112. </div><!-- /.container-fluid -->
  113. </section>
  114. {% endblock %}
  115. <section class="content">
  116. <div class="container-fluid">
  117. {% block main %}{% endblock %}
  118. </div>
  119. </section>
  120. {% endblock %}
  121. </div>
  122. {% block footer %}
  123. {% set content_footer = block('content_footer') is defined ? block('content_footer') : '' %}
  124. <footer class="main-footer">
  125. <div class="float-right d-none d-sm-block">
  126. <b>SovBundle Version</b> 1.0
  127. </div>
  128. <strong>Copyright © {{ 'now'|date('Y') }} <a href="http://laclic.fr">La Clic</a>.</strong> All
  129. rights
  130. reserved.
  131. </footer>
  132. {% endblock %}
  133. {% endblock wrapper %}
  134. </div>
  135. {% endblock wrapper_wrapper %}
  136. {% block configured_javascripts %}
  137. {% for js_asset in ea.assets.jsFiles ?? [] %}
  138. <script src="{{ asset(js_asset) }}"></script>
  139. {% endfor %}
  140. {% for webpack_encore_entry in ea.assets.webpackEncoreAssets ?? [] %}
  141. {{ ea_call_function_if_exists('encore_entry_script_tags', webpack_encore_entry, null, '_default', {'defer': false}) }}
  142. {% endfor %}
  143. {% endblock %}
  144. {% block body_javascript %}{% endblock body_javascript %}
  145. {% block configured_body_contents %}
  146. {% for htmlContent in ea.assets.bodyContents ?? [] %}
  147. {{ htmlContent|raw }}
  148. {% endfor %}
  149. {% endblock %}
  150. {% include '@LcSov/adminlte/filemanager/file-manager-modal.html.twig' %}
  151. {% if app.session is not null and app.session.started %}
  152. {% set flash_messages = app.session.flashbag.all %}
  153. {% if flash_messages|length > 0 %}
  154. <script type="text/javascript">
  155. $(document).ready(function () {
  156. {% for label, messages in flash_messages %}
  157. {% for message in messages %}
  158. Notification.add("{{ label }}", "{{ message|trans|raw|replace({'"': '\"'}) }}");
  159. {% endfor %}
  160. {% endfor %}
  161. });
  162. </script>
  163. {% endif %}
  164. {% endif %}
  165. {% block append_body %}{% endblock %}
  166. </body>
  167. {% endblock body %}
  168. </html>