Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

255 lines
13KB

  1. {# @var ea \EasyCorp\Bundle\EasyAdminBundle\Context\AdminContext #}
  2. {% trans_default_domain ea.i18n.translationDomain %}
  3. <!DOCTYPE html>
  4. <html lang="{{ ea.i18n.htmlLocale }}" dir="{{ ea.i18n.textDirection }}">
  5. <head>
  6. {% block head_metas %}
  7. <meta charset="utf-8">
  8. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9. <meta name="robots"
  10. content="noindex, nofollow, noarchive, nosnippet, noodp, noimageindex, notranslate, nocache"/>
  11. <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
  12. <meta name="generator" content="EasyAdmin"/>
  13. {% endblock head_metas %}
  14. <title>{% block page_title %}{{ block('content_title')|striptags|raw }}{% endblock %}</title>
  15. {# {% block head_stylesheets %}
  16. <link rel="stylesheet" href="{{ asset('bundles/easyadmin/app.css') }}">
  17. {% endblock %} #}
  18. {% block configured_stylesheets %}
  19. {% for css_asset in ea.assets.cssFiles ?? [] %}
  20. <link rel="stylesheet" href="{{ asset(css_asset) }}">
  21. {% endfor %}
  22. {% for webpack_encore_entry in ea.assets.webpackEncoreEntries ?? [] %}
  23. {{ ea_call_function_if_exists('encore_entry_link_tags', webpack_encore_entry) }}
  24. {% endfor %}
  25. {% endblock %}
  26. {% block head_favicon %}
  27. <link rel="shortcut icon" href="{{ asset(ea.dashboardFaviconPath) }}">
  28. {% endblock %}
  29. {# {% block head_javascript %}
  30. <script src="{{ asset('bundles/easyadmin/app.js') }}"></script>
  31. {% endblock head_javascript %} #}
  32. {# {% if 'rtl' == ea.i18n.textDirection %}
  33. <link rel="stylesheet" href="{{ asset('bundles/easyadmin/app.rtl.css') }}">
  34. <link rel="stylesheet" href="{{ asset('bundles/easyadmin/app-custom-rtl.css') }}">
  35. {% endif %} #}
  36. {% block configured_head_contents %}
  37. {% for htmlContent in ea.assets.headContents ?? [] %}
  38. {{ htmlContent|raw }}
  39. {% endfor %}
  40. {% endblock %}
  41. </head>
  42. {% block body %}
  43. <body id="{% block body_id %}{% endblock %}" class="antialiased {% block body_class %}{% endblock %}">
  44. {% block javascript_page_layout %}
  45. <script>
  46. document.body.classList.add(
  47. 'ea-content-width-' + (localStorage.getItem('ea/content/width') || '{{ ea.crud.contentWidth ?? ea.dashboardContentWidth ?? 'normal' }}'),
  48. 'ea-sidebar-width-' + (localStorage.getItem('ea/sidebar/width') || '{{ ea.crud.sidebarWidth ?? ea.dashboardSidebarWidth ?? 'normal' }}')
  49. );
  50. </script>
  51. {% endblock javascript_page_layout %}
  52. {% block wrapper_wrapper %}
  53. {% block flash_messages %}
  54. {{ include(ea.templatePath('flash_messages')) }}
  55. {% endblock flash_messages %}
  56. <div class="wrapper">
  57. TABLER
  58. {% block wrapper %}
  59. {# <header class="main-header">
  60. {% block header %}
  61. <nav class="navbar" role="navigation">
  62. {% block header_navbar %}
  63. <button id="navigation-toggler" type="button" aria-label="Toggle navigation">
  64. <i class="fa fa-fw fa-bars"></i>
  65. </button>
  66. {% endblock header_navbar %}
  67. </nav>
  68. </header> #}
  69. <aside class="navbar navbar-vertical navbar-expand-lg navbar-dark">
  70. <div class="container-fluid">
  71. {% block sidebar %}
  72. {% block header_logo %}
  73. <h1 class="navbar-brand navbar-brand-autodark">
  74. <a class="{{ ea.dashboardTitle|length > 14 ? 'logo-long' }}"
  75. title="{{ ea.dashboardTitle|striptags }}"
  76. href="{{ path(ea.dashboardRouteName) }}">
  77. {{ ea.dashboardTitle|raw }}
  78. </a>
  79. </h1>
  80. {% endblock header_logo %}
  81. <section class="sidebar">
  82. {% block main_menu_wrapper %}
  83. {{ include(ea.templatePath('main_menu')) }}
  84. {% endblock main_menu_wrapper %}
  85. </section>
  86. {% endblock sidebar %}
  87. </div>
  88. </aside>
  89. <div class="page-wrapper">
  90. <div class="sticky-top">
  91. <header class="navbar navbar-expand-md navbar-light sticky-top d-print-none">
  92. <div class="container-xl">
  93. <button class="navbar-toggler" type="button" data-bs-toggle="collapse"
  94. data-bs-target="#navbar-menu">
  95. <span class="navbar-toggler-icon"></span>
  96. </button>
  97. <span class="push-menu">
  98. <i class="ti ti-antenna-bars-1"></i>
  99. </span>
  100. <div class="navbar-nav flex-row order-md-last">
  101. <div class="nav-item d-none d-md-flex me-3">
  102. <div class="btn-list">
  103. {#<a href="{{ path(homepage_route()) }}" class="btn btn-outline-white" target="_blank" rel="noreferrer">
  104. Afficher le site
  105. </a>#}
  106. </div>
  107. </div>
  108. <div class="nav-item dropdown">
  109. <a href="#" class="nav-link d-flex lh-1 text-reset p-0"
  110. data-bs-toggle="dropdown"
  111. aria-label="Open user menu">
  112. <span class="ti ti-user"></span>
  113. <div class="d-none d-xl-block ps-2">
  114. <div>{{ ea.user is null ? 'user.anonymous'|trans(domain = 'EasyAdminBundle') : ea.userMenu.name }}</div>
  115. {% if is_granted('ROLE_SUPER_ADMIN') %}
  116. <div class="mt-1 small text-muted">Superadmin</div>
  117. {% elseif is_granted('ROLE_ADMIN') %}
  118. <div class="mt-1 small text-muted">Admin</div>
  119. {% else %}
  120. <div class="mt-1 small text-muted">NC</div>
  121. {% endif %}
  122. </div>
  123. </a>
  124. {% block user_menu %}
  125. {% if ea.userMenu.items|length > 0 %}
  126. <div class="dropdown-menu dropdown-menu-end dropdown-menu-arrow">
  127. {% for item in ea.userMenu.items %}
  128. {% if item.isMenuSection %}
  129. <hr class="m-0"/>
  130. {% else %}
  131. <a href="{{ item.linkUrl }}"
  132. class="dropdown-item {{ item.cssClass }}"
  133. target="{{ item.linkTarget }}" rel="{{ item.linkRel }}"
  134. referrerpolicy="origin-when-cross-origin">
  135. {% if item.icon is not empty %}
  136. <i class="ta ta-{{ item.icon }}"></i>
  137. {% endif %}
  138. <span>{{ item.label }}</span>
  139. </a>
  140. {% endif %}
  141. {% endfor %}
  142. </div>
  143. {% endif %}
  144. {% endblock user_menu %}
  145. </div>
  146. </div>
  147. </div>
  148. </header>
  149. </div>
  150. {% block content %}
  151. {% block content_header_wrapper %}
  152. <div class="container-xl">
  153. <div class="page-header d-print-none">
  154. <div class="row align-items-center">
  155. {% set has_help_message = (ea.crud.helpMessage ?? '') is not empty %}
  156. {% block content_header %}
  157. <div class="col">
  158. <h2 class="page-title">
  159. {% block content_title %}{% endblock %}
  160. </h2>
  161. {% block content_help %}
  162. {% if has_help_message %}
  163. <div class="text-muted">
  164. {{ ea.crud.helpMessage|e('html_attr') }}
  165. </div>
  166. {% endif %}
  167. {% endblock %}
  168. </div>
  169. {% block page_actions_wrapper %}
  170. <div class="col-auto ms-auto d-print-none">
  171. <div class="btn-list">
  172. {% block page_actions %}{% endblock %}
  173. </div>
  174. </div>
  175. {% endblock %}
  176. {% endblock %}
  177. </div>
  178. </div>
  179. </div>
  180. {% endblock %}
  181. <div class="page-body">
  182. <div class="container-xl">
  183. {% block main %}{% endblock %}
  184. </div>
  185. </div>
  186. {% block content_footer_wrapper %}
  187. {% set content_footer = block('content_footer') is defined ? block('content_footer') : '' %}
  188. {% if content_footer is not empty %}
  189. <footer class="footer footer-transparent d-print-none">
  190. <div class="container">
  191. <div class="row text-center align-items-center flex-row-reverse">
  192. {{ content_footer }}
  193. </div>
  194. </div>
  195. </footer>
  196. {% endif %}
  197. {% endblock %}
  198. {% endblock %}
  199. </div>
  200. {% endblock wrapper %}
  201. </div>
  202. {% endblock wrapper_wrapper %}
  203. {% block configured_javascripts %}
  204. {% for js_asset in ea.assets.jsFiles ?? [] %}
  205. <script src="{{ asset(js_asset) }}"></script>
  206. {% endfor %}
  207. {% for webpack_encore_entry in ea.assets.webpackEncoreEntries ?? [] %}
  208. {{ ea_call_function_if_exists('encore_entry_script_tags', webpack_encore_entry) }}
  209. {% endfor %}
  210. {% endblock %}
  211. {% block body_javascript %}{% endblock body_javascript %}
  212. {% block configured_body_contents %}
  213. {% for htmlContent in ea.assets.bodyContents ?? [] %}
  214. {{ htmlContent|raw }}
  215. {% endfor %}
  216. {% endblock %}
  217. </body>
  218. {% endblock body %}
  219. </html>