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.

234 lines
12KB

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