diff options
Diffstat (limited to 'ishtar_common/templates/ishtar/sheet_town.html')
-rw-r--r-- | ishtar_common/templates/ishtar/sheet_town.html | 31 |
1 files changed, 26 insertions, 5 deletions
diff --git a/ishtar_common/templates/ishtar/sheet_town.html b/ishtar_common/templates/ishtar/sheet_town.html index 2b0cf6e4b..4f154f40d 100644 --- a/ishtar_common/templates/ishtar/sheet_town.html +++ b/ishtar_common/templates/ishtar/sheet_town.html @@ -1,5 +1,5 @@ {% extends "ishtar/sheet.html" %} -{% load i18n ishtar_helpers window_tables window_header window_field from_dict link_to_window %} +{% load i18n l10n ishtar_helpers window_tables window_header window_field from_dict link_to_window %} {% block head_title %}<strong>{% trans "Town" %}</strong> - {{item.name}}{% if item.numero_insee %} ({{item.numero_insee}}){% endif %}{% endblock %} @@ -20,6 +20,9 @@ {% 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" %} <ul class="nav nav-tabs" id="{{window_id}}-tabs" role="tablist"> @@ -64,15 +67,16 @@ <div class="row"> {% if item.surface %} - <dl class="col-12 col-lg-9 flex-wrap"> + <dl class="col-12 col-lg-6 flex-wrap"> <dt>{% trans "Surface" %}</dt> <dd> - {{ item.surface }} m<sup>2</sup> ({{ item.surface_ha }} ha) + {{ item.surface|localize }} m<sup>2</sup> ({{ item.surface_ha }} ha) </dd> </dl> {% endif %} + {% field_flex "Department" item.departement %} {% if item.areas.count %} - <dl class="col-12 col-lg-9 flex-wrap"> + <dl class="col-12 col-lg-6 flex-wrap"> <dt>{% trans "Areas" %}</dt> <dd>{% for area in item.areas.all %}{% if forloop.counter0 %} ; {% endif %}{{area}}{{area|simple_link_to_window}}{% endfor %}</dd> </dl> @@ -101,7 +105,24 @@ {% 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 %} + + </div> + {% if not is_external and SHOW_GEO %} <div class="tab-pane fade" id="{{window_id}}-geodata" role="tabpanel" aria-labelledby="{{window_id}}-geodata-tab"> @@ -129,6 +150,6 @@ $(document).ready( function () { } ); </script> -{% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} +{% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endblock %}
\ No newline at end of file |