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.

77 satır
3.7KB

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