diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-05-05 18:45:33 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-12-12 12:21:00 +0100 |
commit | 559029fcfaf976e2d662528fcbbe297b90dd0a9b (patch) | |
tree | bc849de6718bea64126c2d25fc36973a0599fb1c /archaeological_operations | |
parent | 141044c1f2ee310770de89fbbbfad1cae4ef857e (diff) | |
download | Ishtar-559029fcfaf976e2d662528fcbbe297b90dd0a9b.tar.bz2 Ishtar-559029fcfaf976e2d662528fcbbe297b90dd0a9b.zip |
Geodata: display geodata list on sheet
Diffstat (limited to 'archaeological_operations')
-rw-r--r-- | archaeological_operations/templates/ishtar/sheet_operation.html | 20 | ||||
-rw-r--r-- | archaeological_operations/templates/ishtar/sheet_site.html | 9 |
2 files changed, 27 insertions, 2 deletions
diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index 76aadb444..e9568d5d7 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -18,6 +18,7 @@ {% with permission_view_own_contextrecord=permission_view_own_contextrecord %} {% with permission_view_container=permission_view_container %} {% with permission_view_own_container=permission_view_own_container %} +{% with permission_change_geo=permission_change_own_geovectordata|or_:permission_change_geovectordata %} {% with display_data=item.data %} {% with display_relations=item|safe_or:"right_relations.count|left_relations.count" %} @@ -31,6 +32,7 @@ {% with perm_find=permission_view_own_find|or_:permission_view_find %} {% with has_finds=item|safe_or:"has_finds" %} {% with display_finds=perm_find|and_:has_finds %} +{% with display_geo=item.geodata.count %} {% if output != "ODT" and output != "PDF" %} <ul class="nav nav-tabs" id="{{window_id}}-tabs" role="tablist"> @@ -86,6 +88,15 @@ </a> </li> {% endif %} + {% if not is_external and display_geo %} + <li class="nav-item"> + <a class="nav-link" id="{{window_id}}-geodata-tab" + data-toggle="tab" href="#{{window_id}}-geodata" role="tab" + aria-controls="{{window_id}}-geodata" aria-selected="false"> + {% trans "Geographic data" %} + </a> + </li> + {% endif %} {% if display_data %} <li class="nav-item"> <a class="nav-link" id="{{window_id}}-data-tab" @@ -439,6 +450,13 @@ </div> {% endif %} + {% if not is_external and display_geo %} + <div class="tab-pane fade" id="{{window_id}}-geodata" + role="tabpanel" aria-labelledby="{{window_id}}-geodata-tab"> + {% with geo_item=item %}{% include "ishtar/blocks/sheet_geographic.html" %}{% endwith %} + </div> + {% endif %} + {% if display_data %} <div class="tab-pane fade" id="{{window_id}}-data" role="tabpanel" aria-labelledby="{{window_id}}-data-tab"> @@ -591,6 +609,6 @@ $(document).ready( function () { } ); </script> -{% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} +{% endwith %} {% endwith %} {% endwith %} {% 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 diff --git a/archaeological_operations/templates/ishtar/sheet_site.html b/archaeological_operations/templates/ishtar/sheet_site.html index a1125d202..e9004d875 100644 --- a/archaeological_operations/templates/ishtar/sheet_site.html +++ b/archaeological_operations/templates/ishtar/sheet_site.html @@ -1,5 +1,5 @@ {% extends "ishtar/sheet.html" %} -{% load i18n window_tables window_header window_ope_tables window_field from_dict %} +{% load i18n ishtar_helpers window_tables window_header window_ope_tables window_field from_dict %} {% block head_title %}<strong>{{SITE_LABEL}}</strong> - {{item.cached_label}}{% endblock %} @@ -8,6 +8,8 @@ {% endblock %} {% block content %} +{% with permission_change_geo=permission_change_own_geovectordata|or_:permission_change_geovectordata %} +{% with display_geo=item.geodata.count %} <div class="row"> <div class="offset-lg-4 col-lg-4 offset-md-3 col-md-6 offset-sm-1 col-sm-10 col-12"> @@ -98,4 +100,9 @@ {% endif %} {% endif %} +{% if not is_external and display_geo %} +{% with geo_item=item %}{% include "ishtar/blocks/sheet_geographic.html" %}{% endwith %} +{% endif %} + +{% endwith %} {% endwith %} {% endblock %} |