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
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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 class="fa fa-user-alt"></i> {{ "action.user.account"|trans }}</a>
  80. <div class="dropdown-divider"></div>
  81. <a class="dropdown-item" href="{{ _logout_path }}"><i class="fa fa-sign-out-alt"></i> {{ "action.user.logout"|trans }}</a>
  82. </div>
  83. </div>
  84. {% endblock header_custom_menu %}
  85. </li>
  86. <li>
  87. {% if is_granted('ROLE_ADMIN') %}
  88. <form action="{{ path('admin_switch_merchant') }}" method="post">
  89. <label for="switch-merchant"><i
  90. class="fa fa-store"></i> {{ 'action.switchMerchant'|trans() }} :
  91. </label>
  92. <select id="switch-merchant" class="select2-no-search" name="id_merchant">
  93. {% for merchant in merchants %}
  94. <option value="{{ merchant.id }}"
  95. {% if current_merchant and current_merchant.id == merchant.id %}selected="selected"{% endif %}>
  96. {{ merchant.title }}
  97. </option>
  98. {% endfor %}
  99. </select>
  100. </form>
  101. {% else %}
  102. {% if current_merchant %}
  103. {{ current_merchant.title }}
  104. {% endif %}
  105. {% endif %}
  106. </li>
  107. </ul>
  108. {% endblock navbar %}
  109. </nav>
  110. <!-- Main Sidebar Container -->
  111. <aside class="main-sidebar sidebar-dark-primary elevation-4">
  112. {% block aside %}
  113. {% block aside_logo %}
  114. <a class="brand-link {{ easyadmin_config('site_name')|length > 14 ? 'logo-long' }}"
  115. title="{{ easyadmin_config('site_name')|striptags }}" href="{{ path('easyadmin') }}">
  116. {{ easyadmin_config('site_name')|raw }} <span>Besançon</span>
  117. </a>
  118. {% endblock aside_logo %}
  119. <!-- Sidebar -->
  120. <div class="sidebar">
  121. <nav class="mt-2">
  122. <!-- Add icons to the links using the .nav-icon class with font-awesome or any other icon font library -->
  123. {% block main_menu_wrapper %}
  124. {{ include([
  125. _entity_config is defined ? _entity_config.templates.menu,
  126. easyadmin_config('design.templates.menu'),
  127. '@LcShop/backend/default/menu.html.twig'
  128. ]) }}
  129. {% endblock main_menu_wrapper %}
  130. </nav>
  131. </div>
  132. {% endblock aside %}
  133. </aside>
  134. <div class="content-wrapper">
  135. {% block flash_messages %}
  136. {{ include(_entity_config is defined ? _entity_config.templates.flash_messages : '@EasyAdmin/default/flash_messages.html.twig') }}
  137. {% endblock flash_messages %}
  138. {% block content_header_wrapper %}
  139. {% set _has_content_help = _entity_config is defined and _entity_config[app.request.query.get('action')]['help']|default(false) %}
  140. <section class="content-header {{ _has_content_help ? 'has-content-help' }}">
  141. {% block content_header %}
  142. <div class="d-flex flex-row justify-content-between align-content-center w-100">
  143. <div class="content-header-title">
  144. <h1 class="title">{% block content_title %}{% endblock %}</h1>
  145. </div>
  146. {% block global_actions_wrapper %}
  147. <div class="global-actions">{% block global_actions %}{% endblock %}</div>
  148. {% endblock %}
  149. </div>
  150. {% block content_help %}
  151. {% if _entity_config is defined and _entity_config[app.request.query.get('action')]['help']|default(false) %}
  152. <div class="content-header-help">
  153. {{ _entity_config[app.request.query.get('action')]['help']|trans(domain = _entity_config.translation_domain)|raw }}
  154. </div>
  155. {% endif %}
  156. {% endblock content_help %}
  157. {% endblock content_header %}
  158. </section>
  159. {% endblock content_header_wrapper %}
  160. <section id="main" class="content">
  161. {% block main %}{% endblock %}
  162. </section>
  163. {% block content_footer_wrapper %}
  164. <section class="content-footer">
  165. {% block content_footer %}{% endblock %}
  166. </section>
  167. {% endblock %}
  168. </div>
  169. {% endblock wrapper %}
  170. <footer class="main-footer">
  171. <div class="float-right d-none d-sm-block">
  172. <b>Version</b> 1.0
  173. </div>
  174. <strong>Copyright © {{'now'|date('Y') }} <a href="http://laclic.fr">La Clic</a>.</strong> All rights
  175. reserved.
  176. </footer>
  177. </div>
  178. {% endblock wrapper_wrapper %}
  179. {#Initilisation des varibles requis dans le JS #}
  180. <script>
  181. const DOMAIN = "{{ app.request.getSchemeAndHttpHost() }}";
  182. </script>
  183. {% block body_javascript %}
  184. <!-- jQuery -->
  185. <script src="{{ asset('bundles/lcshop/js/backend/plugin/jquery/jquery.min.js') }}"></script>
  186. <!-- Bootstrap 4 -->
  187. <script src="{{ asset('bundles/lcshop/js/backend/plugin/bootstrap/bootstrap.bundle.min.js') }}"></script>
  188. <script src="{{ asset('bundles/lcshop/js/backend/plugin/toastr/toastr.min.js') }}"></script>
  189. <script src="{{ asset('bundles/lcshop/js/backend/plugin/select2/select2.min.js') }}"></script>
  190. <!-- AdminLTE App -->
  191. <script src="{{ asset('bundles/lcshop/js/backend/plugin/adminlte.min.js') }}"></script>
  192. {% endblock body_javascript %}
  193. {% block body_custom_javascript %}
  194. {% for js_asset in easyadmin_config('design.assets.js') %}
  195. <script src="{{ asset(js_asset) }}"></script>
  196. {% endfor %}
  197. {% endblock body_custom_javascript %}
  198. </body>
  199. {% endblock body %}
  200. </html>