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 14KB

4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
4 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256
  1. {% trans_default_domain "lcshop" %}
  2. <!DOCTYPE html>
  3. <html lang="{{ app.request.locale|split('_')|first|default('fr') }}"
  4. dir="{{ easyadmin_config('design.rtl') ? 'rtl' : 'ltr' }}">
  5. <head>
  6. <meta charset="utf-8">
  7. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  8. <meta name="robots" content="noindex, nofollow, noarchive, nosnippet, noodp, noimageindex, notranslate, nocache"/>
  9. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  10. <meta name="generator" content="EasyAdmin"/>
  11. <title>{% block page_title %}{{ block('content_title')|striptags|raw }}{% endblock %}</title>
  12. {% block head_stylesheets %}
  13. <link rel="stylesheet"
  14. href="{{ asset('bundles/lcshop/css/backend/adminlte/plugins/fontawesome-free/css/all.min.css') }}">
  15. <!-- Theme style -->
  16. <link rel="stylesheet"
  17. href="{{ asset('bundles/lcshop/css/backend/adminlte/plugins/datatables/responsive.bootstrap4.min.css') }}">
  18. <link rel="stylesheet"
  19. href="{{ asset('bundles/lcshop/css/backend/adminlte/plugins/select2/select2.min.css') }}">
  20. <link rel="stylesheet"
  21. href="{{ asset('bundles/lcshop/css/backend/adminlte/plugins/bootstrap/bootstrap-switch.min.css') }}">
  22. <!-- Theme style -->
  23. <link rel="stylesheet" href="{{ asset('bundles/lcshop/css/backend/adminlte/plugins/toastr/toastr.min.css') }}">
  24. <link rel="stylesheet" href="{{ asset('bundles/lcshop/css/backend/adminlte/adminlte.css') }}">
  25. <!-- Google Font: Source Sans Pro -->
  26. <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
  27. {#<link rel="stylesheet" href="{{ asset('bundles/easyadmin/app.css') }}">#}
  28. {% endblock %}
  29. {% block head_custom_stylesheets %}
  30. <link rel="stylesheet" href="{{ asset('bundles/lcshop/css/backend/custom.css') }}">
  31. {% for asset_css in easyadmin_config('design.assets.css') %}
  32. <link rel="stylesheet" href="{{ asset(asset_css) }}">
  33. {% endfor %}
  34. {% endblock head_custom_stylesheets %}
  35. {#
  36. {% if easyadmin_config('design.brand_color') != 'hsl(230, 55%, 60%)' %}
  37. <style>
  38. :root { --color-primary: {{ easyadmin_config('design.brand_color') }}; }
  39. </style>
  40. {% endif %}
  41. #}
  42. {% block head_favicon %}
  43. {% set favicon = easyadmin_config('design.assets.favicon') %}
  44. <link rel="icon" type="{{ favicon.mime_type }}" href="{{ asset(favicon.path) }}"/>
  45. {% endblock %}
  46. </head>
  47. {% block body %}
  48. <body class="{% block body_class %}sidebar-mini layout-navbar-fixed {% endblock %}{% block body_class_extend %}{% endblock %}">
  49. {# <script>
  50. document.body.classList.add(
  51. 'easyadmin-content-width-' + (localStorage.getItem('easyadmin/content/width') || 'normal'),
  52. 'easyadmin-sidebar-width-' + (localStorage.getItem('easyadmin/sidebar/width') || 'normal')
  53. );
  54. </script>#}
  55. {% block wrapper_wrapper %}
  56. <div class="wrapper">
  57. {% block wrapper %}
  58. <!-- Navbar -->
  59. <nav class="main-header navbar navbar-expand navbar-white navbar-light">
  60. {% block navbar %}
  61. <!-- Left navbar links -->
  62. <ul class="navbar-nav">
  63. <li class="nav-item">
  64. <a class="nav-link" data-widget="pushmenu" href="#" role="button"><i
  65. class="fas fa-bars"></i></a>
  66. </li>
  67. </ul>
  68. <ul class="navbar-nav ml-auto lc-navbar">
  69. {% set _user_name = easyadmin_read_property(app.user, easyadmin_config('user.name_property_path'))|default('user.unnamed'|trans(domain = 'EasyAdminBundle')) %}
  70. {% set _logout_path = easyadmin_logout_path() %}
  71. <li class="content-top navbar-custom-menu">
  72. {% block header_custom_menu %}
  73. <div class="btn-group">
  74. <button class="btn btn-block dropdown-toggle"
  75. data-toggle="dropdown" data-placement="bottom">
  76. <i class="fa fa-user-alt"></i>
  77. <span class="user-name">{{ _user_name }}</span>
  78. </button>
  79. <div class="dropdown-menu">
  80. <a class="dropdown-item" href="#"><i
  81. class="fa fa-user-alt"></i> {{ "action.user.account"|trans }}
  82. </a>
  83. <div class="dropdown-divider"></div>
  84. <a class="dropdown-item" href="{{ _logout_path }}"><i
  85. class="fa fa-sign-out-alt"></i> {{ "action.user.logout"|trans }}
  86. </a>
  87. </div>
  88. </div>
  89. {% endblock header_custom_menu %}
  90. </li>
  91. <li>
  92. {% if is_granted('ROLE_ADMIN') %}
  93. <form action="{{ path('admin_switch_merchant') }}" method="post">
  94. <label for="switch-merchant"><i
  95. class="fa fa-store"></i> {{ 'action.switchMerchant'|trans() }} :
  96. </label>
  97. <select id="switch-merchant" data-allow-clear="false" data-width="auto"
  98. class="select2" name="id_merchant">
  99. {% for merchant in merchants %}
  100. <option value="{{ merchant.id }}"
  101. {% if current_merchant and current_merchant.id == merchant.id %}selected="selected"{% endif %}>
  102. {{ merchant.title }}
  103. </option>
  104. {% endfor %}
  105. </select>
  106. </form>
  107. {% else %}
  108. {% if current_merchant %}
  109. {{ current_merchant.title }}
  110. {% endif %}
  111. {% endif %}
  112. </li>
  113. <li>
  114. <a target="_blank" class="btn btn-outline-success"
  115. href="{{ merchantUtils.getMerchantUser.getMerchantConfig('url') }}">Afficher le
  116. site</a>
  117. </li>
  118. </ul>
  119. {% endblock navbar %}
  120. </nav>
  121. <!-- Main Sidebar Container -->
  122. <aside class="main-sidebar sidebar-dark-primary elevation-4">
  123. {% block aside %}
  124. {% block aside_logo %}
  125. <a class="brand-link {{ easyadmin_config('site_name')|length > 14 ? 'logo-long' }}"
  126. title="{{ easyadmin_config('site_name')|striptags }}" href="{{ path('easyadmin') }}">
  127. {{ easyadmin_config('site_name')|raw }}
  128. </a>
  129. {% endblock aside_logo %}
  130. <!-- Sidebar -->
  131. <div class="sidebar">
  132. <nav class="mt-2">
  133. <!-- Add icons to the links using the .nav-icon class with font-awesome or any other icon font library -->
  134. {% block main_menu_wrapper %}
  135. {{ include([
  136. _entity_config is defined ? _entity_config.templates.menu,
  137. easyadmin_config('design.templates.menu'),
  138. '@LcShop/backend/default/menu.html.twig'
  139. ]) }}
  140. {% endblock main_menu_wrapper %}
  141. </nav>
  142. </div>
  143. {% endblock aside %}
  144. </aside>
  145. <div class="content-wrapper">
  146. {% block flash_messages %}
  147. {% include '@LcShop/backend/default/block/flash_messages.html.twig' %}
  148. {% endblock flash_messages %}
  149. {% block content_header_wrapper %}
  150. {% set _has_content_help = _entity_config is defined and _entity_config[app.request.query.get('action')]['help']|default(false) %}
  151. <section class="content-header {{ _has_content_help ? 'has-content-help' }}">
  152. <div class="container-fluid">
  153. {% block content_header %}
  154. <div class="d-flex flex-row justify-content-between align-content-center w-100">
  155. <div class="content-header-title">
  156. <h1 class="title">{% block content_title %}{% endblock %}</h1>
  157. </div>
  158. {% block global_actions_wrapper %}
  159. <div class="global-actions">
  160. {% block global_actions %}{% endblock %}
  161. {#{{ dump(_request_parameters) }}#}
  162. <button type="button" class="btn-sm btn-primary btn-add-reminder "
  163. data-url="{{ path('easyadmin', { action: 'new', entity: 'Reminder' }) }}">
  164. + Ajouter pense bête
  165. </button>
  166. </div>
  167. {% endblock %}
  168. </div>
  169. {% block content_reminders %}
  170. {% if reminders|length >0 %}
  171. <div class="head-reminders card card-outline card-danger">
  172. {% include '@LcShop/backend/default/block/list_reminders.html.twig' %}
  173. </div>
  174. {% endif %}
  175. {% endblock %}
  176. {% block content_help %}
  177. {% if _entity_config is defined and _entity_config[app.request.query.get('action')]['help']|default(false) %}
  178. <div class="content-header-help">
  179. {{ _entity_config[app.request.query.get('action')]['help']|trans(domain = _entity_config.translation_domain)|raw }}
  180. </div>
  181. {% endif %}
  182. {% endblock content_help %}
  183. {% endblock content_header %}
  184. </div>
  185. </section>
  186. {% endblock content_header_wrapper %}
  187. <section id="main" class="content">
  188. <div class="container-fluid">
  189. {% block main %}{% endblock %}
  190. </div>
  191. </section>
  192. {% block content_footer_wrapper %}
  193. <section class="content-footer">
  194. {% block content_footer %}{% endblock %}
  195. </section>
  196. {% endblock %}
  197. </div>
  198. {% endblock wrapper %}
  199. <footer class="main-footer">
  200. <div class="float-right d-none d-sm-block">
  201. <b>Version</b> 1.0
  202. </div>
  203. <strong>Copyright © {{ 'now'|date('Y') }} <a href="http://laclic.fr">La Clic</a>.</strong> All rights
  204. reserved.
  205. </footer>
  206. </div>
  207. {% endblock wrapper_wrapper %}
  208. {#Initilisation des varibles requis dans le JS #}
  209. <script>
  210. const DOMAIN = "{{ app.request.getSchemeAndHttpHost() }}";
  211. </script>
  212. {% block plugin_javascript %}
  213. <!-- jQuery -->
  214. <script src="{{ asset('bundles/lcshop/js/backend/plugin/jquery/jquery.min.js') }}"></script>
  215. <!-- Bootstrap 4 -->
  216. <script src="{{ asset('bundles/lcshop/js/backend/plugin/bootstrap/bootstrap.bundle.min.js') }}"></script>
  217. <script src="{{ asset('bundles/lcshop/js/backend/plugin/toastr/toastr.min.js') }}"></script>
  218. <script src="{{ asset('bundles/lcshop/js/backend/plugin/select2/select2.min.js') }}"></script>
  219. <script src="{{ asset('bundles/lcshop/js/backend/plugin/bootstrap/bootstrap-switch.min.js') }}"></script>
  220. <!-- AdminLTE App -->
  221. <script src="{{ asset('bundles/lcshop/js/backend/plugin/adminlte.min.js') }}"></script>
  222. <script src="{{ asset('bundles/lcshop/js/backend/script/default/utils.js') }}"></script>
  223. {% endblock plugin_javascript %}
  224. {% block script_javascript %}
  225. <script src="{{ asset('bundles/lcshop/js/backend/script/default/init-common.js') }}"></script>
  226. {% endblock script_javascript %}
  227. {% block add_script_javascript %}{% endblock add_script_javascript %}
  228. </body>
  229. {% endblock body %}
  230. </html>