{% extends "ishtar/sheet.html" %} {% load i18n l10n ishtar_helpers window_tables window_header window_field from_dict link_to_window %} {% block head_title %}{% trans "Town" %} - {{item.name}}{% if item.numero_insee %} ({{item.numero_insee}}){% endif %}{% endblock %} {% block toolbar %} {% window_nav item window_id 'show-town' %} {% endblock %} {% block content %} {# trick to set to null non existing variable #} {% with permission_view_document=permission_view_document %} {% with permission_view_own_document=permission_view_own_document %} {% with permission_change_own_geovectordata=permission_change_own_geovectordata %} {% with permission_change_geovectordata=permission_change_geovectordata %} {% with permission_change_geo=permission_change_own_geovectordata|or_:permission_change_geovectordata %} {% with perm_documents=permission_view_own_document|or_:permission_view_document %} {% with has_documents=item|safe_or:"documents.count|documents_list" %} {% with display_documents=perm_documents|and_:has_documents %} {% with perm_files=permission_view_own_file|or_:permission_view_file %} {% with perm_operations=permission_view_own_operation|or_:permission_view_operation %} {% with perm_sites=permission_view_own_archaeologicalsite|or_:permission_view_archaeologicalsite %} {% if output != "ODT" and output != "PDF" %} {% endif %}
{% include "ishtar/blocks/window_image.html" %}
{% if item.numero_insee %} {{ item.numero_insee }}{% endif %}

{{item.name}}

{% if item.surface %}
{% trans "Surface" %}
{{ item.surface|localize }} m2 ({{ item.surface_ha }} ha)
{% endif %} {% field_flex "Department" item.departement %} {% with has_image=item.images.count %} {% if not has_image %}
{% endif %} {% if has_image %}
{% endif %} {% endwith %}
{% if item.areas.count %}
{% trans "Areas" %}
{% for area in item.areas.all %}{% if forloop.counter0 %} ; {% endif %}{{area}}{{area|simple_link_to_window}}{% endfor %}
{% endif %} {% if item.children.count %}
{% trans "Old town of" %}
{% for town in item.children.all %}{% if forloop.counter0 %} ; {% endif %}{{town}}{{town|simple_link_to_window}}{% endfor %}
{% endif %} {% if item.parents.count %}
{% trans "New town for" %}
{% for town in item.parents.all %}{% if forloop.counter0 %} ; {% endif %}{{town}}{{town|simple_link_to_window}}{% endfor %}
{% endif %}
{% if PROFILE.mapping and item.main_geodata %}

{% trans "Geographic localisation" %}

{% with geo_item=item %} {% include "ishtar/blocks/sheet_map.html"%} {% endwith %}
{% endif %} {% if display_documents and item.documents.count %} {% trans "Documents" as town_docs %} {% dynamic_table_document town_docs 'documents' 'towns' item.pk '' output %} {% endif %} {% if perm_files and item.file.count %} {% trans "Archaeological files" as town_files %} {% dynamic_table_document town_files 'files' 'towns' item.pk '' output %} {% endif %} {% if perm_operations and item.operations.count %} {% trans "Operations" as town_operations %} {% dynamic_table_document town_operations 'operations' 'towns' item.pk '' output %} {% endif %} {% if perm_sites and item.sites.count %} {% trans "Sites" as town_sites %} {% dynamic_table_document town_sites 'sites' 'towns' item.pk '' output %} {% endif %} {% if not is_external and SHOW_GEO %}
{% with geo_item=item %}{% include "ishtar/blocks/sheet_geographic.html" %}{% endwith %}
{% endif %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endblock %}