Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

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