Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

60 lines
2.4KB

  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. {% if params_reminders_null != params_reminders %}
  33. {% set reminders = sov_reminders(params_reminders) %}
  34. {% include '@LcSov/admin/reminder/block.html.twig' %}
  35. {% endif %}
  36. {% endblock %}
  37. {% block append_body %}
  38. {# modal switch merchant #}
  39. {% set user = app.user %}
  40. {% set merchant_current = merchant_current() %}
  41. {% if(user.favoriteMerchant != merchant_current) %}
  42. {# modal affichée uniquement si la sessionStorage.visit_merchant n'est pas défini (js) #}
  43. {% include '@LcCaracole/admin/merchant/modal/switch_merchant.html.twig' %}
  44. {% endif %}
  45. {% endblock %}
  46. {% macro form_switch_section(section) %}
  47. {% set form_switch_section = carac_form_switch_section(section) %}
  48. {% form_theme form_switch_section '@LcSov/adminlte/crud/form_theme.html.twig' %}
  49. {{ form_start(form_switch_section) }}
  50. {{ form(form_switch_section) }}
  51. {{ form_end(form_switch_section) }}
  52. {% endmacro %}