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.

237 lines
13KB

  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="{% block body_class %}layout-navbar-fixed sidebar-mini{% endblock %}">
  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. <li>
  109. <a target="_blank" class="btn btn-outline-success" href="{{ path('frontend_home') }}">Afficher le site</a>
  110. </li>
  111. </ul>
  112. {% endblock navbar %}
  113. </nav>
  114. <!-- Main Sidebar Container -->
  115. <aside class="main-sidebar sidebar-dark-primary elevation-4">
  116. {% block aside %}
  117. {% block aside_logo %}
  118. <a class="brand-link {{ easyadmin_config('site_name')|length > 14 ? 'logo-long' }}"
  119. title="{{ easyadmin_config('site_name')|striptags }}" href="{{ path('easyadmin') }}">
  120. {{ easyadmin_config('site_name')|raw }} <span>Besançon</span>
  121. </a>
  122. {% endblock aside_logo %}
  123. <!-- Sidebar -->
  124. <div class="sidebar">
  125. <nav class="mt-2">
  126. <!-- Add icons to the links using the .nav-icon class with font-awesome or any other icon font library -->
  127. {% block main_menu_wrapper %}
  128. {{ include([
  129. _entity_config is defined ? _entity_config.templates.menu,
  130. easyadmin_config('design.templates.menu'),
  131. '@LcShop/backend/default/menu.html.twig'
  132. ]) }}
  133. {% endblock main_menu_wrapper %}
  134. </nav>
  135. </div>
  136. {% endblock aside %}
  137. </aside>
  138. <div class="content-wrapper">
  139. {% block flash_messages %}
  140. {{ include(_entity_config is defined ? _entity_config.templates.flash_messages : '@EasyAdmin/default/flash_messages.html.twig') }}
  141. {% endblock flash_messages %}
  142. {% block content_header_wrapper %}
  143. {% set _has_content_help = _entity_config is defined and _entity_config[app.request.query.get('action')]['help']|default(false) %}
  144. <section class="content-header {{ _has_content_help ? 'has-content-help' }}">
  145. <div class="container-fluid">
  146. {% block content_header %}
  147. <div class="d-flex flex-row justify-content-between align-content-center w-100">
  148. <div class="content-header-title">
  149. <h1 class="title">{% block content_title %}{% endblock %}</h1>
  150. </div>
  151. {% block global_actions_wrapper %}
  152. <div class="global-actions">{% block global_actions %}{% endblock %}</div>
  153. {% endblock %}
  154. </div>
  155. {% block content_help %}
  156. {% if _entity_config is defined and _entity_config[app.request.query.get('action')]['help']|default(false) %}
  157. <div class="content-header-help">
  158. {{ _entity_config[app.request.query.get('action')]['help']|trans(domain = _entity_config.translation_domain)|raw }}
  159. </div>
  160. {% endif %}
  161. {% endblock content_help %}
  162. {% endblock content_header %}
  163. </div>
  164. </section>
  165. {% endblock content_header_wrapper %}
  166. <section id="main" class="content">
  167. <div class="container-fluid">
  168. {% block main %}{% endblock %}
  169. </div>
  170. </section>
  171. {% block content_footer_wrapper %}
  172. <section class="content-footer">
  173. {% block content_footer %}{% endblock %}
  174. </section>
  175. {% endblock %}
  176. </div>
  177. {% endblock wrapper %}
  178. <footer class="main-footer">
  179. <div class="float-right d-none d-sm-block">
  180. <b>Version</b> 1.0
  181. </div>
  182. <strong>Copyright © {{ 'now'|date('Y') }} <a href="http://laclic.fr">La Clic</a>.</strong> All rights
  183. reserved.
  184. </footer>
  185. </div>
  186. {% endblock wrapper_wrapper %}
  187. {#Initilisation des varibles requis dans le JS #}
  188. <script>
  189. const DOMAIN = "{{ app.request.getSchemeAndHttpHost() }}";
  190. </script>
  191. {% block plugin_javascript %}
  192. <!-- jQuery -->
  193. <script src="{{ asset('bundles/lcshop/js/backend/plugin/jquery/jquery.min.js') }}"></script>
  194. <!-- Bootstrap 4 -->
  195. <script src="{{ asset('bundles/lcshop/js/backend/plugin/bootstrap/bootstrap.bundle.min.js') }}"></script>
  196. <script src="{{ asset('bundles/lcshop/js/backend/plugin/toastr/toastr.min.js') }}"></script>
  197. <script src="{{ asset('bundles/lcshop/js/backend/plugin/select2/select2.min.js') }}"></script>
  198. <script src="{{ asset('bundles/lcshop/js/backend/plugin/bootstrap/bootstrap-switch.min.js') }}"></script>
  199. <!-- AdminLTE App -->
  200. <script src="{{ asset('bundles/lcshop/js/backend/plugin/adminlte.min.js') }}"></script>
  201. <script src="{{ asset('bundles/lcshop/js/backend/script/default/utils.js') }}"></script>
  202. {% endblock plugin_javascript %}
  203. {% block script_javascript %}
  204. <script src="{{ asset('bundles/lcshop/js/backend/script/default/init-common.js') }}"></script>
  205. {% endblock script_javascript %}
  206. {% block add_script_javascript %}{% endblock add_script_javascript %}
  207. </body>
  208. {% endblock body %}
  209. </html>