Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

complementary.html.twig 1.3KB

3 anos atrás
1234567891011121314151617181920212223242526272829
  1. {% set order_shop = entity.instance %}
  2. {% set main_order_shop = entity.instance.mainOrderShop %}
  3. {% if main_order_shop is defined and main_order_shop is not null %}
  4. {% if order_shop.getSection() != main_order_shop.getSection() or section_container.solver.isSectionWithdrawal(order_shop.getSection()) %}
  5. <span class="badge badge-warning section-{{ main_order_shop.getSection().getDevAlias() }}">
  6. Complément {{ main_order_shop.getSection() }}
  7. </span>
  8. {% else %}
  9. <span class="badge badge-warning">Complément</span>
  10. {% endif %}
  11. {% else %}
  12. <span class="badge badge-secondary">Principale</span>
  13. {% set complementary_order_shops = entity.instance.complementaryOrderShops %}
  14. {% if complementary_order_shops and complementary_order_shops|length > 0 %}
  15. <span class="badge badge-success section-{{ order_shop.getSection().getDevAlias() }}">{{ complementary_order_shops|length}} complément{% if complementary_order_shops|length > 1 %}s{% endif %}</span>
  16. {% endif %}
  17. {% endif %}
  18. {# {% set value = entity.instance.complementaryOrderShops|length %}
  19. {% if value > 0 %}
  20. <span class="badge badge-success">
  21. {{ value|length }} compléments
  22. </span>
  23. {% else %}
  24. <span class="badge badge-danger">
  25. non
  26. </span>
  27. {% endif %}
  28. #}