選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

71 行
3.5KB

  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 append_body %}
  33. {# modal switch merchant #}
  34. {% set user = app.user %}
  35. {% set merchant_current = merchant_resolver.getCurrent() %}
  36. {% if(user.favoriteMerchant != merchant_current) %}
  37. {# modal affichée uniquement si la sessionStorage.visit_merchant n'est pas défini (js) #}
  38. {% embed '@LcSov/adminlte/embed/modal.twig' %}
  39. {% block id %}carac-modal-switch-merchant{% endblock %}
  40. {% block size %}modal-lg{% endblock %}
  41. {% block title %}
  42. Bienvenue sur le marchand <i>{{ merchant_current.getTitle() }}</i>
  43. {% endblock %}
  44. {% block body %}
  45. {% if not user.favoriteMerchant %}
  46. <p>Vous n'avez pas de marchand favoris.</p>
  47. {% endif %}
  48. {% if user.favoriteMerchant and user.favoriteMerchant != merchant_current %}
  49. <p>Vous n'êtes pas sur votre marchand par favoris.</p>
  50. {% endif %}
  51. <p>Vous pouvez soit définir le marchand <strong>{{ merchant_current.getTitle() }}</strong>
  52. comme marchand favoris ou simplement indiquer que vous visitez ce marchand pour aujourd'hui.</p>
  53. {% endblock %}
  54. {% block footer %}
  55. {% set form_switch_merchant = carac_form_switch_merchant('admin', 'carac_favorite_merchant') %}
  56. {% form_theme form_switch_merchant '@LcSov/adminlte/crud/form_theme.html.twig' %}
  57. {{ form_start(form_switch_merchant) }}
  58. {{ form(form_switch_merchant) }}
  59. {{ form_end(form_switch_merchant) }}
  60. <button id="carac-button-visit-merchant" type="button" class="btn btn-default"
  61. data-dismiss="modal">Visiter</button>
  62. {% endblock %}
  63. {% endembed %}
  64. {% endif %}
  65. {% endblock %}