{% load i18n tz %} {% if interventions|length >= 100 %} {% endif %}
{% for intervention in interventions %}
{{ intervention.code }} {{ intervention.title }}
{{ intervention.get_status_display }} {% if intervention.is_contract_blocked %} {% translate "Marché bloqué" %} {% endif %} {% if intervention.prep_state %} {% if intervention.prep_state == "processed" %} {% elif intervention.prep_state == "not_processed" %} {% endif %} {% endif %} {% if intervention.list_begin_time %}
{{ intervention.list_begin_time|localtime|date:"d/m/Y H:i" }}
{% endif %}
{% if intervention.lat and intervention.lon %} {% endif %} {% if not intervention.assigned_member %} {% else %} {% endif %}
{% if intervention.preparation_orders.all %}
{% for order in intervention.preparation_orders.all %} {% if order.is_loan %} {% translate "Prêt" %} {% endif %} {% for item in order.preparationorderitem_set.all|slice:":3" %} {{ item.product.name }} × {{ item.quantity }} {% endfor %} {% for item in order.other_items.all|slice:":2" %} {{ item.name }} × {{ item.quantity }} {% endfor %} {% with total_count=order.preparationorderitem_set.all|length|add:order.other_items.all|length %} {% if total_count > 3 %} +{{ total_count|add:"-3" }} {% endif %} {% endwith %} {% endfor %}
{% endif %}
{% empty %}

{% translate "Aucune intervention trouvée." %}

{% endfor %}