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.

265 lines
15KB

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