{% extends base_template|default:"base.html" %} {% load i18n static %} {% block title %}{% translate "Modèles de tournées" %}{% endblock %} {% block extra_css %} {% endblock %} {% block content %}

{% translate "Modèles de tournées" %}

{% translate "Retour au hub" %}
{% translate "Tournées configurées" %}
{% for row in preset_rows %} {% with preset=row.preset %}
{{ preset.code }} — {{ preset.get_name }} {% if not preset.is_active %} {% translate "Inactif" %} {% endif %}
{{ preset.get_default_visit_type_display }} {% if row.targets %} • {{ row.targets|length }} {% translate "cible(s)" %} {% else %} • {% translate "Générique (sans cibles)" %} {% endif %} {% for t in preset.thematics.all %} {{ t.name }} {% endfor %}
{% if preset.description %}
{{ preset.description }}
{% endif %} {% if row.targets %}
{% for tgt in row.targets %} {{ tgt.type_label }} · {{ tgt.label }} {% endfor %}
{% endif %}
{% if can_create_visit or can_manage_tour_presets %}
{% if can_create_visit and preset.is_active %} {% translate "Lancer" %} {% endif %} {% if can_manage_tour_presets %}
{% csrf_token %}
{% endif %}
{% endif %}
{% endwith %} {% empty %}
{% translate "Aucun modèle de tournée configuré." %}
{% endfor %}
{% if can_manage_tour_presets %}
{% if editing_preset %} {% translate "Modifier le modèle" %} {{ editing_preset.code }} {% else %} {% translate "Nouveau modèle" %} {% endif %}
{% if editing_preset %} {% translate "Annuler" %} {% endif %}
{% csrf_token %} {% if form.errors %}
{{ form.errors }}
{% endif %}
{{ form.code.label_tag }}{{ form.code }}
{{ form.name_fr.label_tag }}{{ form.name_fr }}
{{ form.name_nl.label_tag }}{{ form.name_nl }}
{{ form.default_visit_type.label_tag }}{{ form.default_visit_type }}
{{ form.description.label_tag }}{{ form.description }}
{{ form.thematics.label_tag }}
{{ form.thematics }}
{% translate "Laissez vide pour un modèle générique (ex. « Contrôle micro-projet ») : l'utilisateur définira la zone ou les cibles sur la visite." %}
{{ form.is_active }} {{ form.is_active.label_tag }}
{% endif %}
{% endblock %} {% block extra_js %} {% if can_manage_tour_presets %} {% endif %} {% endblock %}