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.

232 line
11KB

  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. {{ dump(ea.assets.webpackEncoreAssets) }}
  25. {% for webpack_encore_entry in ea.assets.webpackEncoreAssets ?? [] %}
  26. {{ ea_call_function_if_exists('encore_entry_link_tags', webpack_encore_entry) }}
  27. {% endfor %}
  28. {% endblock %}
  29. {% block head_favicon %}
  30. <link rel="shortcut icon" href="{{ asset(ea.dashboardFaviconPath) }}">
  31. {% endblock %}
  32. {# {% block head_javascript %}
  33. <script src="{{ asset('bundles/easyadmin/app.js') }}"></script>
  34. {% endblock head_javascript %} #}
  35. {# {% if 'rtl' == ea.i18n.textDirection %}
  36. <link rel="stylesheet" href="{{ asset('bundles/easyadmin/app.rtl.css') }}">
  37. <link rel="stylesheet" href="{{ asset('bundles/easyadmin/app-custom-rtl.css') }}">
  38. {% endif %} #}
  39. {# CKEditor #}
  40. <script type="text/javascript">
  41. var CKEDITOR_BASEPATH = "{{ ckeditor_base_path("/bundles/fosckeditor/") }}";
  42. </script>
  43. <script type="text/javascript" src="{{ asset('bundles/fosckeditor/ckeditor.js') }}"></script>
  44. {% block configured_head_contents %}
  45. {% for htmlContent in ea.assets.headContents ?? [] %}
  46. {{ htmlContent|raw }}
  47. {% endfor %}
  48. {% endblock %}
  49. </head>
  50. {% block body %}
  51. <body id="{% block body_id %}{% endblock %}"
  52. class="admin sidebar-mini layout-fixed {% block body_class %}{% endblock %}">
  53. {% block javascript_page_layout %}
  54. <script>
  55. document.body.classList.add(
  56. 'ea-content-width-' + (localStorage.getItem('ea/content/width') || '{{ ea.crud.contentWidth ?? ea.dashboardContentWidth ?? 'normal' }}'),
  57. 'ea-sidebar-width-' + (localStorage.getItem('ea/sidebar/width') || '{{ ea.crud.sidebarWidth ?? ea.dashboardSidebarWidth ?? 'normal' }}')
  58. );
  59. </script>
  60. {% endblock javascript_page_layout %}
  61. {% block wrapper_wrapper %}
  62. {% block flash_messages %}
  63. {{ include(ea.templatePath('flash_messages')) }}
  64. {% endblock flash_messages %}
  65. <div class="wrapper">
  66. {% block wrapper %}
  67. {% block navbar_header %}
  68. {{ include('@LcSov/adminlte/block/navbar_header.html.twig') }}
  69. {% endblock %}
  70. <aside class="main-sidebar sidebar-dark-primary elevation-4">
  71. {% block sidebar %}
  72. {% block header_logo %}
  73. <a class="brand-link text-center"
  74. title="{{ ea.dashboardTitle|striptags }}"
  75. href="{{ path(ea.dashboardRouteName) }}">
  76. {{ logo_admin()|raw }}
  77. </a>
  78. {% endblock header_logo %}
  79. <div class="sidebar">
  80. {% block main_menu_wrapper %}
  81. {{ include(ea.templatePath('main_menu')) }}
  82. {% endblock main_menu_wrapper %}
  83. </div>
  84. {% endblock sidebar %}
  85. </aside>
  86. <div class="content-wrapper" style="min-height: 554px;">
  87. {% block content %}
  88. {% block content_header_wrapper %}
  89. <section class="content-header">
  90. <div class="container-fluid">
  91. <div class="row mb-2">
  92. {% set params_reminders = {crudAction: null, crudControllerFqcn: null, entityId: null} %}
  93. {% set params_reminders_null = params_reminders %}
  94. {% if ea is defined and ea %}
  95. {% if ea.crud is defined and ea.crud %}
  96. {% set params_reminders = params_reminders|merge({crudAction: ea.crud.currentAction}) %}
  97. {% set params_reminders = params_reminders|merge({crudControllerFqcn: ea.crud.controllerFqcn}) %}
  98. {% endif %}
  99. {% if ea.request.query.get('entityId') and ea.entity is defined and ea.entity.instance is defined %}
  100. {% set params_reminders = params_reminders|merge({entityId: ea.entity.instance.id}) %}
  101. {% endif %}
  102. {% endif %}
  103. {% block reminders %}
  104. {% if params_reminders_null != params_reminders %}
  105. {% set reminders = sov_reminders(params_reminders) %}
  106. {% include '@LcSov/admin/reminder/block.html.twig' %}
  107. {% endif %}
  108. {% endblock %}
  109. {% set has_help_message = (ea.crud.helpMessage ?? '') is not empty %}
  110. {% block content_header %}
  111. <div class="col-sm-6">
  112. <h1 class="m-0 text-dark">
  113. {% block content_title %}{% endblock %}
  114. </h1>
  115. {% block content_breadcrumb %}
  116. {% endblock content_breadcrumb %}
  117. {# {% block content_help %}
  118. {% if has_help_message %}
  119. <div class="text-muted">
  120. {{ ea.crud.helpMessage|e('html_attr') }}
  121. </div>
  122. {% endif %}
  123. {% endblock %} #}
  124. </div><!-- /.col -->
  125. <div class="col-sm-6">
  126. {% block page_actions_wrapper %}
  127. <div class="btn-list float-sm-right">
  128. {% block page_actions %}{% endblock %}
  129. </div>
  130. {% endblock %}
  131. </div><!-- /.col -->
  132. {% endblock %}
  133. </div><!-- /.row -->
  134. </div><!-- /.container-fluid -->
  135. </section>
  136. {% endblock %}
  137. <section class="content">
  138. <div class="container-fluid">
  139. {% if replace_content_with_message is defined %}
  140. <div class="alert alert-warning" role="alert">
  141. {{ replace_content_with_message }}
  142. </div>
  143. {% else %}
  144. {% block main %}{% endblock %}
  145. {% endif %}
  146. </div>
  147. </section>
  148. {% endblock %}
  149. </div>
  150. {% block footer %}
  151. {% set content_footer = block('content_footer') is defined ? block('content_footer') : '' %}
  152. <footer class="main-footer">
  153. <div class="float-right d-none d-sm-block">
  154. <b>SovBundle Version</b> 1.0
  155. </div>
  156. <strong>Copyright © {{ 'now'|date('Y') }} <a href="http://laclic.fr">La Clic</a>.</strong> All
  157. rights
  158. reserved.
  159. </footer>
  160. {% endblock %}
  161. {% endblock wrapper %}
  162. </div>
  163. {% endblock wrapper_wrapper %}
  164. {% block configured_javascripts %}
  165. {% for js_asset in ea.assets.jsFiles ?? [] %}
  166. <script src="{{ asset(js_asset) }}"></script>
  167. {% endfor %}
  168. {% for webpack_encore_entry in ea.assets.webpackEncoreAssets ?? [] %}
  169. {{ ea_call_function_if_exists('encore_entry_script_tags', webpack_encore_entry, null, '_default', {'defer': false}) }}
  170. {% endfor %}
  171. {% endblock %}
  172. {% block body_javascript %}{% endblock body_javascript %}
  173. {% block configured_body_contents %}
  174. {% for htmlContent in ea.assets.bodyContents ?? [] %}
  175. {{ htmlContent|raw }}
  176. {% endfor %}
  177. {% endblock %}
  178. {% include '@LcSov/adminlte/block/modal_filemanager.html.twig' %}
  179. {% if app.session is not null and app.session.started %}
  180. {% set flash_messages = app.session.flashbag.all %}
  181. {% if flash_messages|length > 0 %}
  182. <script type="text/javascript">
  183. $(document).ready(function () {
  184. {% for label, messages in flash_messages %}
  185. {% for message in messages %}
  186. SovNotification.add("{{ label }}", "{{ message|trans|raw|replace({'"': '\"'}) }}");
  187. {% endfor %}
  188. {% endfor %}
  189. });
  190. </script>
  191. {% endif %}
  192. {% endif %}
  193. {% block append_body %}{% endblock %}
  194. </body>
  195. {% endblock body %}
  196. </html>