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.

58 lines
2.3KB

  1. {% extends '@LcSov/adminlte/layout.html.twig' %}
  2. {% block navbar_header %}
  3. {{ parent() }}
  4. {% set section_current = section_current() %}
  5. {% set is_display_switch_section = display_switch_section is defined and display_switch_section %}
  6. <nav class="carac navbar navbar-expand navbar-light main-header{% if is_display_switch_section %} display-section-switch {{ section_container.solver.getHtmlClass(section_current()) }}{% endif %}">
  7. {% if is_display_switch_section %}
  8. <ul class="navbar-nav left">
  9. <li class="nav-item d-none d-sm-inline-block">
  10. {{ _self.form_switch_section(null) }}
  11. </li>
  12. {% for section in carac_sections() %}
  13. <li class="nav-item d-none d-sm-inline-block">
  14. {{ _self.form_switch_section(section) }}
  15. </li>
  16. {% endfor %}
  17. </ul>
  18. {% endif %}
  19. <ul class="navbar-nav ml-auto right">
  20. <li class="nav-item nav-switch-merchant">
  21. <i class="fa fa-store"></i>
  22. {% set form_switch_merchant = carac_form_switch_merchant('admin') %}
  23. {% form_theme form_switch_merchant '@LcSov/adminlte/crud/form_theme.html.twig' %}
  24. {{ form_start(form_switch_merchant) }}
  25. {{ form(form_switch_merchant) }}
  26. {{ form_end(form_switch_merchant) }}
  27. </li>
  28. </ul>
  29. </nav>
  30. {% endblock %}
  31. {% block reminders %}
  32. {% set reminders = carac_reminders(params_reminders) %}
  33. {% include '@LcSov/admin/reminder/block.html.twig' %}
  34. {% endblock %}
  35. {% block append_body %}
  36. {# modal switch merchant #}
  37. {% set user = app.user %}
  38. {% set merchant_current = merchant_current() %}
  39. {% if(user.favoriteMerchant != merchant_current) %}
  40. {# modal affichée uniquement si la sessionStorage.visit_merchant n'est pas défini (js) #}
  41. {% include '@LcCaracole/admin/merchant/modal/switch_merchant.html.twig' %}
  42. {% endif %}
  43. {% endblock %}
  44. {% macro form_switch_section(section) %}
  45. {% set form_switch_section = carac_form_switch_section(section) %}
  46. {% form_theme form_switch_section '@LcSov/adminlte/crud/form_theme.html.twig' %}
  47. {{ form_start(form_switch_section) }}
  48. {{ form(form_switch_section) }}
  49. {{ form_end(form_switch_section) }}
  50. {% endmacro %}