From 9db820c7d0d47c6116a977b2e4c57f6d36ff3b46 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 7 Jan 2019 15:49:46 +0100 Subject: Fix display of sheet find when no permission is defined --- archaeological_finds/templates/ishtar/sheet_find.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'archaeological_finds/templates') diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html index ee0e67f2e..7171c3deb 100644 --- a/archaeological_finds/templates/ishtar/sheet_find.html +++ b/archaeological_finds/templates/ishtar/sheet_find.html @@ -15,6 +15,10 @@ {% endif %} +{# trick to set to null non existing variable #} +{% with permission_view_document=permission_view_document %} +{% with permission_view_own_document=permission_view_own_document %} + {% with display_identification=item.integrities.count|or_:item.remarkabilities.count|or_:item.conservatory_state|or_:item.conservatory_comment|or_:item.alterations.count|or_:item.alteration_causes.count|or_:item.preservation_to_considers.count|or_:item.appraisal_date|or_:item.treatment_emergency|or_:item.insurance_value|or_:item.estimated_value|or_:item.datings.count|or_:item.dating_comment %} {% with display_warehouse_treatments=item.container|or_:item.container_ref|or_:item.upstream_treatment|or_:item.downstream_treatment|or_:item.treatments.count %} {% with can_view_documents=permission_view_own_document|or_:permission_view_document %} @@ -391,7 +395,7 @@ {% endif %} -{% endwith %}{% endwith %}{% endwith %}{% endwith %} +{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %} {% endblock %} -- cgit v1.2.3