No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

228 líneas
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. {% 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 params_reminders = {crudAction: null, crudControllerFqcn: null, entityId: null} %}
  88. {% set params_reminders_null = params_reminders %}
  89. {% if ea is defined and ea %}
  90. {% if ea.crud is defined and ea.crud %}
  91. {% set params_reminders = params_reminders|merge({crudAction: ea.crud.currentAction}) %}
  92. {% set params_reminders = params_reminders|merge({crudControllerFqcn: ea.crud.controllerFqcn}) %}
  93. {% endif %}
  94. {% if ea.request.query.get('entityId') and ea.entity is defined and ea.entity.instance is defined %}
  95. {% set params_reminders = params_reminders|merge({entityId: ea.entity.instance.id}) %}
  96. {% endif %}
  97. {% endif %}
  98. {% block reminders %}
  99. {% if params_reminders_null != params_reminders %}
  100. {% set reminders = sov_reminders(params_reminders) %}
  101. {% include '@LcSov/admin/reminder/block.html.twig' %}
  102. {% endif %}
  103. {% endblock %}
  104. {% set has_help_message = (ea.crud.helpMessage ?? '') is not empty %}
  105. {% block content_header %}
  106. <div class="col-sm-6">
  107. <h1 class="m-0 text-dark">
  108. {% block content_title %}{% endblock %}
  109. </h1>
  110. {% block content_breadcrumb %}
  111. {% endblock content_breadcrumb %}
  112. {# {% block content_help %}
  113. {% if has_help_message %}
  114. <div class="text-muted">
  115. {{ ea.crud.helpMessage|e('html_attr') }}
  116. </div>
  117. {% endif %}
  118. {% endblock %} #}
  119. </div><!-- /.col -->
  120. <div class="col-sm-6">
  121. {% block page_actions_wrapper %}
  122. <div class="btn-list float-sm-right">
  123. {% block page_actions %}{% endblock %}
  124. </div>
  125. {% endblock %}
  126. </div><!-- /.col -->
  127. {% endblock %}
  128. </div><!-- /.row -->
  129. </div><!-- /.container-fluid -->
  130. </section>
  131. {% endblock %}
  132. <section class="content">
  133. <div class="container-fluid">
  134. {% if replace_content_with_message is defined %}
  135. <div class="alert alert-warning" role="alert">
  136. {{ replace_content_with_message }}
  137. </div>
  138. {% else %}
  139. {% block main %}{% endblock %}
  140. {% endif %}
  141. </div>
  142. </section>
  143. {% endblock %}
  144. </div>
  145. {% block footer %}
  146. {% set content_footer = block('content_footer') is defined ? block('content_footer') : '' %}
  147. <footer class="main-footer">
  148. <div class="float-right d-none d-sm-block">
  149. <b>SovBundle Version</b> 1.0
  150. </div>
  151. <strong>Copyright © {{ 'now'|date('Y') }} <a href="http://laclic.fr">La Clic</a>.</strong> All
  152. rights
  153. reserved.
  154. </footer>
  155. {% endblock %}
  156. {% endblock wrapper %}
  157. </div>
  158. {% endblock wrapper_wrapper %}
  159. {% block configured_javascripts %}
  160. {% for js_asset in ea.assets.jsFiles ?? [] %}
  161. <script src="{{ asset(js_asset) }}"></script>
  162. {% endfor %}
  163. {% for webpack_encore_entry in ea.assets.webpackEncoreAssets ?? [] %}
  164. {{ ea_call_function_if_exists('encore_entry_script_tags', webpack_encore_entry, null, '_default', {'defer': false}) }}
  165. {% endfor %}
  166. {% endblock %}
  167. {% block body_javascript %}{% endblock body_javascript %}
  168. {% block configured_body_contents %}
  169. {% for htmlContent in ea.assets.bodyContents ?? [] %}
  170. {{ htmlContent|raw }}
  171. {% endfor %}
  172. {% endblock %}
  173. {% include '@LcSov/adminlte/block/modal_filemanager.html.twig' %}
  174. {% if app.session is not null and app.session.started %}
  175. {% set flash_messages = app.session.flashbag.all %}
  176. {% if flash_messages|length > 0 %}
  177. <script type="text/javascript">
  178. $(document).ready(function () {
  179. {% for label, messages in flash_messages %}
  180. {% for message in messages %}
  181. SovNotification.add("{{ label }}", "{{ message|trans|raw|replace({'"': '\"'}) }}");
  182. {% endfor %}
  183. {% endfor %}
  184. });
  185. </script>
  186. {% endif %}
  187. {% endif %}
  188. {% block append_body %}{% endblock %}
  189. </body>
  190. {% endblock body %}
  191. </html>