Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

67 lines
3.2KB

  1. {% extends '@LcSov/adminlte/layout.html.twig' %}
  2. {% block navbar_header %}
  3. {{ parent() }}
  4. {% set section_current = section_resolver.getCurrent() %}
  5. <nav class="carac navbar navbar-expand navbar-light main-header" style="border-color: {{ section_current.color }};">
  6. <ul class="navbar-nav left">
  7. {% for section in carac_get_sections() %}
  8. <li class="nav-item d-none d-sm-inline-block">
  9. {% set form_switch_section = carac_get_form_switch_section(section) %}
  10. {% form_theme form_switch_section '@LcSov/adminlte/crud/form_theme.html.twig' %}
  11. {{ form_start(form_switch_section) }}
  12. {{ form(form_switch_section) }}
  13. {{ form_end(form_switch_section) }}
  14. </li>
  15. {% endfor %}
  16. </ul>
  17. <ul class="navbar-nav ml-auto right">
  18. <li class="nav-item nav-switch-merchant">
  19. <i class="fa fa-store"></i>
  20. {% set form_switch_merchant = carac_get_form_switch_merchant('admin') %}
  21. {% form_theme form_switch_merchant '@LcSov/adminlte/crud/form_theme.html.twig' %}
  22. {{ form_start(form_switch_merchant) }}
  23. {{ form(form_switch_merchant) }}
  24. {{ form_end(form_switch_merchant) }}
  25. </li>
  26. </ul>
  27. </nav>
  28. {% endblock %}
  29. {% block append_body %}
  30. {# modal switch merchant #}
  31. {% set user = app.user %}
  32. {% set merchant_current = merchant_resolver.getCurrent() %}
  33. {% if(user.favoriteMerchant != merchant_current) %}
  34. {# modal affichée uniquement si la sessionStorage.visit_merchant n'est pas défini (js) #}
  35. {% embed '@LcSov/adminlte/embed/modal.twig' %}
  36. {% block id %}carac-modal-switch-merchant{% endblock %}
  37. {% block size %}modal-lg{% endblock %}
  38. {% block title %}
  39. Bienvenue sur le marchand <i>{{ merchant_current.getTitle() }}</i>
  40. {% endblock %}
  41. {% block body %}
  42. {% if not user.favoriteMerchant %}
  43. <p>Vous n'avez pas de marchand favoris.</p>
  44. {% endif %}
  45. {% if user.favoriteMerchant and user.favoriteMerchant != merchant_current %}
  46. <p>Vous n'êtes pas sur votre marchand par favoris.</p>
  47. {% endif %}
  48. <p>Vous pouvez soit définir le marchand <strong>{{ merchant_current.getTitle() }}</strong>
  49. comme marchand favoris ou simplement indiquer que vous visitez ce marchand pour aujourd'hui.</p>
  50. {% endblock %}
  51. {% block footer %}
  52. {% set form_switch_merchant = carac_get_form_switch_merchant('admin', 'carac_favorite_merchant') %}
  53. {% form_theme form_switch_merchant '@LcSov/adminlte/crud/form_theme.html.twig' %}
  54. {{ form_start(form_switch_merchant) }}
  55. {{ form(form_switch_merchant) }}
  56. {{ form_end(form_switch_merchant) }}
  57. <button id="carac-button-visit-merchant" type="button" class="btn btn-default"
  58. data-dismiss="modal">Visiter</button>
  59. {% endblock %}
  60. {% endembed %}
  61. {% endif %}
  62. {% endblock %}