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.

30 lines
1.3KB

  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. #}