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.

260 lines
14KB

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