From dd56c0880afc6a9246d7a598fc3e24c2d89aea83 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Wed, 7 Dec 2022 14:21:16 +0100 Subject: Find sheet: do not display container information if no permission --- CHANGES.md | 2 ++ archaeological_finds/templates/ishtar/sheet_find.html | 13 ++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 4af5eed6a..20ffd0be9 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -4,6 +4,8 @@ date: 2022-12-05 --- ### Features/improvements ### +- Sheet: set default permissions to False +- Find sheet: do not display container information if no permission ### Bug fixes ### - Full text search: add "simple" config in search diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html index 1ccfbad8e..45544d415 100644 --- a/archaeological_finds/templates/ishtar/sheet_find.html +++ b/archaeological_finds/templates/ishtar/sheet_find.html @@ -26,6 +26,7 @@ {% with non_modif_treatments_count=item.non_modif_treatments_count %} {% with associated_treatment_files_count=item.associated_treatment_files_count %} +{% with can_view_container=permission_view_own_container|or_:permission_view_container %} {% with display_warehouse_treatments=item.container|or_:item.container_ref|or_:item.upstream_treatment|or_:item.downstream_treatment|or_:non_modif_treatments_count|or_:associated_treatment_files_count %} {% with can_view_documents=permission_view_own_document|or_:permission_view_document %} {% with display_documents=can_view_documents|and_:item.documents_count %} @@ -300,6 +301,7 @@ {% endif %} {% endcomment %} {% if item.container or item.container_ref %} + {% if can_view_container %}

{% trans "Warehouse - container" %}

{% if item.container_ref != item.container and item.container_ref %} @@ -371,6 +373,15 @@ {% endif %} {% endif %}
+ {% endif %} + + + + + {% endif %} {% if item.upstream_treatment or item.downstream_treatment or non_modif_treatments_count %} {% if non_modif_treatments_count %} @@ -560,7 +571,7 @@ {% endif %} -{% endwith %} {% endwith %} {% endwith %} {% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %} +{% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %} {% endblock %} -- cgit v1.2.3