From b4ebf75f816a2da61fab8e6275964b5d4858a64c Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 30 Sep 2025 17:16:37 +0200 Subject: ♻️ sheet find refactoring: add a sheet_find_containers sub template MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../templates/ishtar/sheet_find_containers.html | 59 +++++++++++++++++++++ .../templates/ishtar/sheet_find_treatments.html | 61 +--------------------- 2 files changed, 61 insertions(+), 59 deletions(-) create mode 100644 archaeological_finds/templates/ishtar/sheet_find_containers.html (limited to 'archaeological_finds') diff --git a/archaeological_finds/templates/ishtar/sheet_find_containers.html b/archaeological_finds/templates/ishtar/sheet_find_containers.html new file mode 100644 index 000000000..f7eaa845e --- /dev/null +++ b/archaeological_finds/templates/ishtar/sheet_find_containers.html @@ -0,0 +1,59 @@ +{% load i18n l10n window_field link_to_window %} + {% if item.container_ref != item.container and item.container_ref %} +
+
{% trans "Reference container" %}
+
+ +
+
+ {% endif %} + {% if item.container %} +
+
+ {% if item.container_ref != item.container %} + {% trans "Current container" %}{% else %} + {% trans "Reference container / current container" %} + {% endif %} +
+
+ +
+
+ {% endif %} diff --git a/archaeological_finds/templates/ishtar/sheet_find_treatments.html b/archaeological_finds/templates/ishtar/sheet_find_treatments.html index 961134691..b024f3f47 100644 --- a/archaeological_finds/templates/ishtar/sheet_find_treatments.html +++ b/archaeological_finds/templates/ishtar/sheet_find_treatments.html @@ -29,64 +29,8 @@ {% if can_view_container %}

{% trans "Warehouse - container" %}

- {% if item.container_ref != item.container and item.container_ref %} -
-
{% trans "Reference container" %}
-
- -
-
- {% endif %} - {% if item.container %} -
-
- {% if item.container_ref != item.container %} - {% trans "Current container" %}{% else %} - {% trans "Reference container / current container" %} - {% endif %} -
-
- -
-
- {% if item.container.index %} + {% include "ishtar/sheet_find_containers.html" %} + {% if item.container and item.container.index %}
{% trans "Index" %}
@@ -96,7 +40,6 @@
{% endif %} - {% endif %}
{% else %}