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

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