diff options
-rw-r--r-- | CHANGES.md | 3 | ||||
-rw-r--r-- | archaeological_warehouse/templates/ishtar/sheet_container.html | 32 |
2 files changed, 27 insertions, 8 deletions
diff --git a/CHANGES.md b/CHANGES.md index f54d5c251..891d8aac6 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,7 +7,8 @@ Ishtar changelog ================ - Table: fix default sort when pk is not "id" -- Sheet warehouse: fix localisation +- Sheet warehouse: fix localisation - fix data +- Sheet container: fix localisation - fix data v4.0.34 - 2023-01-13 -------------------- diff --git a/archaeological_warehouse/templates/ishtar/sheet_container.html b/archaeological_warehouse/templates/ishtar/sheet_container.html index 3cc03cad1..061a3c788 100644 --- a/archaeological_warehouse/templates/ishtar/sheet_container.html +++ b/archaeological_warehouse/templates/ishtar/sheet_container.html @@ -15,6 +15,11 @@ {% with has_documents=item.documents.count %} {% with display_documents=can_view_documents|and_:has_documents %} +{% with display_geo=item.geodata.count %} +{% 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 %} + {% if output != "ODT" and output != "PDF"%} <ul class="nav nav-tabs" id="{{window_id}}-tabs" role="tablist"> <li class="nav-item"> @@ -47,6 +52,15 @@ </a> </li> {% endif %} + {% if not is_external and PROFILE.locate_warehouses %} + <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 %} </ul> {% endif %} @@ -130,9 +144,9 @@ {% endif %}{% endwith %} {% include "ishtar/blocks/sheet_creation_section.html" %} {% field_flex_full "Comment" item.comment "<pre>" "</pre>" %} - {% include "ishtar/blocks/sheet_json.html" %} </div> </div> + {% include "ishtar/blocks/sheet_json.html" %} {% with item.container_type as container_type %} {% if container_type.length or container_type.width or container_type.height or container_type.volume or container_type.reference %} <h4>{% trans "Container type" %}</h4> @@ -147,16 +161,14 @@ </div> {% endif %} {% endwith %} - {% if PROFILE.locate_warehouses %} - {% if item.point_2d or item.multi_polygon %} - <h3>{% trans "Localisation"%}</h3> + {% if PROFILE.locate_warehouses and display_geo %} + <h3>{% trans "Localisation" %}</h3> <div class='row'> {% with geo_item=item %} - {% include "ishtar/blocks/sheet_map.html" %} + {% include "ishtar/blocks/sheet_map.html"%} {% endwith %} </div> {% endif %} - {% endif %} </div> <div class="tab-pane fade" id="{{window_id}}-content" @@ -280,6 +292,12 @@ {% endif %} </div> {% endif %} + {% if not is_external and PROFILE.locate_warehouses %} + <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 %} </div> @@ -300,5 +318,5 @@ $(document).ready( function () { } ); </script> -{% endwith %} {% endwith %} {% endwith %} {% endwith %} +{% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endblock %} |