From ce71f7f286819ee1399fef5f1819f9cc812149a6 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 13 Mar 2025 13:30:02 +0100 Subject: ✨ sheets: refactor document listing - add edit and unlink actions (refs #6221) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archaeological_warehouse/templates/ishtar/sheet_container.html | 9 +++------ archaeological_warehouse/templates/ishtar/sheet_warehouse.html | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'archaeological_warehouse/templates') diff --git a/archaeological_warehouse/templates/ishtar/sheet_container.html b/archaeological_warehouse/templates/ishtar/sheet_container.html index a3acd20e7..55b1d9fa6 100644 --- a/archaeological_warehouse/templates/ishtar/sheet_container.html +++ b/archaeological_warehouse/templates/ishtar/sheet_container.html @@ -295,12 +295,9 @@ {% if display_documents %}
- {% trans "Document for this container" as ct_docs %} - {% if permission_view_own_document or permission_view_document %} - {% if item.documents.count %} - {% dynamic_table_document ct_docs 'documents' 'containers' item.pk '' output %} - {% endif %} - {% endif %} + {% with permission_change_item=item|can_edit_item:request %} + {% include "ishtar/blocks/sheet_document_list.html" %} + {% endwith %}
{% endif %} {% if not is_external and PROFILE.locate_warehouses %} diff --git a/archaeological_warehouse/templates/ishtar/sheet_warehouse.html b/archaeological_warehouse/templates/ishtar/sheet_warehouse.html index 68e0c0174..7d086d52f 100644 --- a/archaeological_warehouse/templates/ishtar/sheet_warehouse.html +++ b/archaeological_warehouse/templates/ishtar/sheet_warehouse.html @@ -260,12 +260,9 @@ {% if display_documents %}
- {% trans "Document for this warehouse" as w_docs %} - {% if permission_view_own_document or permission_view_document %} - {% if item.documents.count %} - {% dynamic_table_document w_docs 'documents' 'warehouses' item.pk '' output %} - {% endif %} - {% endif %} + {% with permission_change_item=item|can_edit_item:request %} + {% include "ishtar/blocks/sheet_document_list.html" %} + {% endwith %}
{% endif %} {% if not is_external and PROFILE.locate_warehouses %} -- cgit v1.2.3