summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2023-01-17 13:24:02 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2023-01-17 13:24:48 +0100
commitbd4d63259ca7f672a6b8e6fefea45f853ab8acd6 (patch)
tree59e185bb5fb73c6a6b3cb49ebacf877bc6872f46
parentf40188371208e221889fb933b1bac3a45b875d64 (diff)
downloadIshtar-bd4d63259ca7f672a6b8e6fefea45f853ab8acd6.tar.bz2
Ishtar-bd4d63259ca7f672a6b8e6fefea45f853ab8acd6.zip
Sheet warehouse: fix localisation
-rw-r--r--CHANGES.md3
-rw-r--r--archaeological_warehouse/templates/ishtar/sheet_warehouse.html30
2 files changed, 29 insertions, 4 deletions
diff --git a/CHANGES.md b/CHANGES.md
index 35a7bc156..f54d5c251 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -6,6 +6,9 @@ date: 2023-01-13
Ishtar changelog
================
+- Table: fix default sort when pk is not "id"
+- Sheet warehouse: fix localisation
+
v4.0.34 - 2023-01-13
--------------------
diff --git a/archaeological_warehouse/templates/ishtar/sheet_warehouse.html b/archaeological_warehouse/templates/ishtar/sheet_warehouse.html
index 4f4cfd6ba..287bf8683 100644
--- a/archaeological_warehouse/templates/ishtar/sheet_warehouse.html
+++ b/archaeological_warehouse/templates/ishtar/sheet_warehouse.html
@@ -11,6 +11,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">
@@ -43,6 +48,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 %}
@@ -95,16 +109,18 @@
{% field_flex def_div_label item.default_location_types|join:", " %}
{% field_flex_full "Comment" item.comment "<pre>" "</pre>" %}
{% include "ishtar/blocks/sheet_creation_section.html" %}
- {% include "ishtar/blocks/sheet_json.html" %}
</div>
+ {% include "ishtar/blocks/sheet_json.html" %}
- {% if item.point_2d or item.multi_polygon or item.get_address or item.get_address_complement or item.get_postal_code or item.get_town %}
+ {% if display_geo or item.get_address or item.get_address_complement or item.get_postal_code or item.get_town %}
<h3>{% trans "Localisation"%}</h3>
+ {% if PROFILE.locate_warehouses and display_geo %}
<div class='row'>
{% with geo_item=item %}
- {% if PROFILE.locate_warehouses %}{% include "ishtar/blocks/sheet_map.html"%}{% endif %}
+ {% include "ishtar/blocks/sheet_map.html"%}
{% endwith %}
</div>
+ {% endif %}
<div class="row">
{% with full=True %}{% include "ishtar/blocks/sheet_address_section.html" %}{% endwith %}
</div>
@@ -236,6 +252,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>
<script type="text/javascript">
@@ -255,5 +277,5 @@ $(document).ready( function () {
} );
</script>
-{% endwith %} {% endwith %} {% endwith %}
+{% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %}
{% endblock %}