{% extends "base.html" %} {% load static %} {% load tz %} {% load i18n %} {% load documents_tags %} {% load asset_tags %} {% load document_viewer_tags %} {% block content %}

{{ street.code }}{% if street.get_name %} – {{ street.get_name }}{% endif %}

{% if can_edit_location %}
{% endif %}
{% if street.name_fr %}
{% translate "Nom (FR)" %}
{{ street.name_fr }}
{% endif %} {% if street.name_nl %}
{% translate "Naam (NL)" %}
{{ street.name_nl }}
{% endif %}
{% translate "Commune" %}
{{ street.municipality|default:"-" }}
{% if street.lon and street.lat %} {% translate 'Street View' %} {% translate "View in Google Street View" %} {% endif %}
{{ assets.poles|length }} {% translate "Poteaux" %} {{ assets.light_fixtures|length }} {% translate "Luminaires" %} {{ assets.electrical_cabinets|length }} {% translate "Armoires électriques" %} {{ assets.cables|length }} {% translate "Câbles" %}
{% if street.updated_at %}
{% translate "Dernière mise à jour" %} : {{ street.updated_at|timezone:"Europe/Paris"|date:"d/m/Y H:i" }}{% if street.updated_by %} ({% translate "par" %} {{ street.updated_by.username }}){% endif %}
{% endif %}

{% translate "Documents" %}

{% if can_manage_documents %} {% endif %}
{% if can_browse_folder and document_folder %}
{{ street.code }}
{% endif %} {% if use_managed_documents %} {% render_document_viewer main_documents modal_id="plDocViewerModal" show_tags=True show_versions=True location_id=street.id %} {% else %} {% if main_documents or other_documents %}
{% for document in main_documents %} {% if document %}
{{ document.get_document_type_display }}
{% if document.thumbnail %} {{ document.filename }} {% else %} {% endif %}
{{ document.upload_date|timezone:"Europe/Paris"|date:"d/m/Y" }}
{{ document.uploaded_by.username }}
{% if can_manage_documents %} {% endif %}
{% endif %} {% endfor %}
{% for document in other_documents %} {% if document %}
{{ document.get_document_type_display }}
{% if document.thumbnail %} {{ document.filename }} {% else %} {% endif %}
{{ document.upload_date|timezone:"Europe/Paris"|date:"d/m/Y" }}
{{ document.uploaded_by.username }}
{% if can_manage_documents %}
{% endif %}
{% endif %} {% endfor %}
{% else %}

{% translate "Aucun document" %}

{% endif %} {% endif %}
{% if can_manage_documents %} {% endif %}

{% translate "Assets" %}

{% if allowed_location_actions or can_edit_assets %}
{% if can_edit_assets %} {% translate "Importer inventaire" %} {% endif %} {% if 'create' in allowed_location_actions %} {% endif %} {% if 'bulk_archive' in allowed_location_actions %} {% endif %}
{% endif %}
{% if can_edit_assets and pl_import_sessions %}
{% translate "Import(s) d'inventaire en cours pour cette voirie :" %} {% for imp in pl_import_sessions %} {{ imp.name }} ({{ imp.summary_stats.progress_pct|default:0 }}%) {% endfor %}
{% translate "Voir tous les imports" %} →
{% endif %}
{# ── Onglet Installation extérieure ── #}
{# ── Colonne Poteaux ── #}
{% translate "Poteaux" %} {{ assets.poles|length }} {% if assets.poles %} {% endif %}
{% if assets.poles %}
    {% for pole in assets.poles %}
  • {{ pole.code }} {% if pole.get_name %}{{ pole.get_name }}{% endif %} {% if pole.sorted_light_fixtures or pole.sorted_radars or pole.sorted_signpanels or pole.sorted_its_assets %}
    {% if pole.sorted_light_fixtures %} {{ pole.sorted_light_fixtures|length }} {% endif %} {% if pole.sorted_radars %} {{ pole.sorted_radars|length }} {% endif %} {% if pole.sorted_signpanels %} {{ pole.sorted_signpanels|length }} {% endif %} {% if pole.sorted_its_assets %} {{ pole.sorted_its_assets|length }} {% endif %}
    {% endif %}
    {% if pole.sorted_light_fixtures or pole.sorted_radars or pole.sorted_signpanels or pole.sorted_its_assets %}
      {% for light in pole.sorted_light_fixtures %}
    • {{ light.code }} {% if light.get_name %}{{ light.get_name }}{% endif %}
    • {% endfor %} {% for radar in pole.sorted_radars %}
    • {{ radar.code }} {% if radar.get_name %}{{ radar.get_name }}{% endif %}
    • {% endfor %} {% for panel in pole.sorted_signpanels %}
    • {{ panel.code }} {% if panel.signpanel_type %}{{ panel.signpanel_type }}{% endif %}
    • {% endfor %} {% for its_asset in pole.sorted_its_assets %}
    • {{ its_asset.code }} {% if its_asset.get_name %}{{ its_asset.get_name }}{% endif %}
    • {% endfor %}
    {% endif %}
  • {% endfor %}
{% else %}

{% translate "Aucun poteau" %}

{% endif %}
{# ── Colonne Armoires électriques + Luminaires sans poteau EP ── #}
{# Armoires électriques #}
{% translate "Armoires électriques" %} {{ assets.electrical_cabinets|length }}
{% if assets.electrical_cabinets %}
    {% for cabinet in assets.electrical_cabinets %}
  • {{ cabinet.code }} {% if cabinet.get_name %}{{ cabinet.get_name }}{% endif %} {% if cabinet.ean_code %}{{ cabinet.ean_code }}{% endif %}
  • {% endfor %}
{% else %}

{% translate "Aucune armoire électrique" %}

{% endif %}
{# Câbles EP #}
{% translate "Câbles" %} {{ assets.cables|length }}
{% if assets.cables %}
    {% for cable in assets.cables %}
  • {{ cable.code }} {% if cable.get_name %}{{ cable.get_name }}{% endif %}
    {% if cable.length_m %} {{ cable.length_m|floatformat:0 }} m {% endif %} {% if cable.is_estimated and cable.validation_status != 'validated' %} {% translate "Estimé" %} {% endif %}
  • {% endfor %}
{% else %}

{% translate "Aucun câble" %}

{% endif %}
{# Luminaires indépendants / sur poteau feu tricolore #}
{% translate "Autres luminaires" %} {{ assets.standalone_light_fixtures|length }}
{% if assets.standalone_light_fixtures %} {% else %}

{% translate "Aucun luminaire hors poteau EP" %}

{% endif %}
{# ── Onglet Archives ── #}
{% if archived_assets_count > 0 %}
{% if archived_assets.poles %}
{% translate "Poteaux" %} {{ archived_assets.poles|length }}
    {% for pole in archived_assets.poles %}
  • {{ pole.code }} {% if pole.get_name %}{{ pole.get_name }}{% endif %} {{ pole.get_status_display }}
  • {% endfor %}
{% endif %} {% if archived_assets.light_fixtures %}
{% translate "Luminaires" %} {{ archived_assets.light_fixtures|length }}
    {% for light in archived_assets.light_fixtures %}
  • {{ light.code }} {% if light.get_name %}{{ light.get_name }}{% endif %} {{ light.get_status_display }}
  • {% endfor %}
{% endif %} {% if archived_assets.electrical_cabinets %}
{% translate "Armoires électriques" %} {{ archived_assets.electrical_cabinets|length }}
    {% for cabinet in archived_assets.electrical_cabinets %}
  • {{ cabinet.code }} {% if cabinet.get_name %}{{ cabinet.get_name }}{% endif %} {{ cabinet.get_status_display }}
  • {% endfor %}
{% endif %} {% if archived_assets.cables %}
{% translate "Câbles" %} {{ archived_assets.cables|length }}
    {% for cable in archived_assets.cables %}
  • {{ cable.code }} {% if cable.get_name %}{{ cable.get_name }}{% endif %} {{ cable.get_status_display }}
  • {% endfor %}
{% endif %}
{% else %}
{% translate "Aucun asset archivé ou inactif" %}
{% endif %}

{% translate "Interventions" %}

{{ interventions|length }}
{% if interventions %} {% for interv in interventions %} {% endfor %}
{% translate "Code" %} {% translate "Titre" %} {% translate "Début" %} {% translate "Statut" %}
{{ interv.code }} {{ interv.title }} {{ interv.begin_time|date:"d-m-Y H:i" }} {{ interv.get_status_display }}
{% else %}

{% translate "Aucune intervention" %}

{% endif %}
{% translate "Plan" %}
{% if 'create' in allowed_location_actions %} {% endif %} {% endblock content %} {% block script %} {{ street.lon|json_script:"lon_value" }} {{ street.lat|json_script:"lat_value" }} {{ geom|json_script:"geom_value" }} {{ assets_geojson|json_script:"assets_geojson" }} {% if allowed_location_actions %} {% endif %} {# ── Location editing modals (edit / delete) ── #} {% if can_edit_location %} {% include "assets/components/location_edit_modals.html" with thematic_code=thematic_code location_type=location_type entry_label="Voirie EP" %} {% endif %} {% endblock script %}