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

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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235
  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/dataTables.bootstrap4.min.css') }}">
  18. <link rel="stylesheet"
  19. href="{{ asset('bundles/lcshop/css/backend/adminlte/plugins/datatables/responsive.bootstrap4.min.css') }}">
  20. <link rel="stylesheet"
  21. href="{{ asset('bundles/lcshop/css/backend/adminlte/plugins/select2/select2.min.css') }}">
  22. <!-- Theme style -->
  23. <link rel="stylesheet" href="{{ asset('bundles/lcshop/css/backend/adminlte/plugins/toastr/toastr.min.css') }}">
  24. <link rel="stylesheet" href="{{ asset('bundles/lcshop/css/backend/adminlte/adminlte.min.css') }}">
  25. <!-- Google Font: Source Sans Pro -->
  26. <link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
  27. {#<link rel="stylesheet" href="{{ asset('bundles/easyadmin/app.css') }}">#}
  28. {% endblock %}
  29. {% block head_custom_stylesheets %}
  30. {% for css_asset in easyadmin_config('design.assets.css') %}
  31. <link rel="stylesheet" href="{{ asset(css_asset) }}">
  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="layout-navbar-fixed sidebar-mini">
  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" class="select2-no-search" 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. </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 body_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. <!-- AdminLTE App -->
  199. <script src="{{ asset('bundles/lcshop/js/backend/plugin/adminlte.min.js') }}"></script>
  200. <script src="{{ asset('bundles/lcshop/js/backend/script/vuejs-mixins.js') }}"></script>
  201. {% endblock body_javascript %}
  202. {% block body_custom_javascript %}
  203. {% for js_asset in easyadmin_config('design.assets.js') %}
  204. <script src="{{ asset(js_asset) }}"></script>
  205. {% endfor %}
  206. {% endblock body_custom_javascript %}
  207. </body>
  208. {% endblock body %}
  209. </html>