{% load i18n tz interventions_tags %} {% if interventions|length >= 100 %} {% endif %}
{% if routing_available %} {% endif %}
{% for intervention in interventions %}
1 {% if intervention.priority == '1' %} {% translate "Urgent" %} {% elif intervention.priority == '2' %} {% translate "Priorité haute" %} {% endif %}
{{ intervention.code }} {% with status_icon=intervention.status|intervention_status_icon %} {% if status_icon %}{% endif %}{{ intervention.get_status_display }} {% if intervention.is_assigned and intervention.status in 'in_preparation to_be_approved to_be_planned to_be_processed assigned in_progress on_pause finished' %} {% endif %} {% endwith %} {% if intervention.show_contract_blocked_warning %} {% translate "Marché bloqué" %} {% endif %} {% if intervention.prep_state %} {% if intervention.prep_state == "processed" %} {% elif intervention.prep_state == "not_processed" %} {% endif %} {% endif %}
{% if intervention.lat and intervention.lon %} {% endif %} {% if not intervention.assigned_member %} {% else %} {% endif %}
{{ intervention.title }}
{% if intervention.list_begin_time %}
{{ intervention.list_begin_time|localtime|date:"d/m/Y H:i" }}
{% endif %} {% if intervention.has_material %}
{% for order in intervention.preparation_orders.all %} {% if order.status != 'cancelled' %} {% 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 %} {% endif %} {% endfor %}
{% endif %}
{% empty %}

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

{% endfor %}