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.

layout.html.twig 2.3KB

3 år sedan
3 år sedan
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. {{ _self.form_switch_section() }}
  9. {% endif %}
  10. <ul class="navbar-nav ml-auto right">
  11. <li class="nav-item nav-switch-merchant">
  12. <i class="fa fa-store"></i>
  13. {% set form_switch_merchant = carac_form_switch_merchant('admin', 'carac_merchant_switch', false) %}
  14. {% form_theme form_switch_merchant '@LcSov/adminlte/crud/form_theme.html.twig' %}
  15. {{ form_start(form_switch_merchant) }}
  16. {{ form(form_switch_merchant) }}
  17. {{ form_end(form_switch_merchant) }}
  18. </li>
  19. </ul>
  20. </nav>
  21. {% endblock %}
  22. {% block reminders %}
  23. {% if params_reminders_null != params_reminders %}
  24. {% set reminders = sov_reminders(params_reminders) %}
  25. {% include '@LcSov/admin/reminder/block.html.twig' %}
  26. {% endif %}
  27. {% endblock %}
  28. {% block append_body %}
  29. {# modal switch merchant #}
  30. {% set user = app.user %}
  31. {% set merchant_current = merchant_current() %}
  32. {% if(user.favoriteMerchant != merchant_current) %}
  33. {# modal affichée uniquement si la sessionStorage.visit_merchant n'est pas défini (js) #}
  34. {% include '@LcCaracole/admin/merchant/modal/switch_merchant.html.twig' %}
  35. {% endif %}
  36. {% endblock %}
  37. {% macro form_switch_section() %}
  38. {% set form_switch_section = carac_form_switch_section() %}
  39. {% form_theme form_switch_section '@LcSov/adminlte/crud/form_theme.html.twig' %}
  40. {{ form_start(form_switch_section) }}
  41. <ul class="navbar-nav left">
  42. {% for field in form_switch_section %}
  43. <li class="nav-item d-none d-sm-inline-block">
  44. {{ form_row(field) }}
  45. </li>
  46. {% endfor %}
  47. </ul>
  48. {{ form_end(form_switch_section) }}
  49. {% endmacro %}