From 3b4833c22507808582722125fa92355c294882d9 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 27 Aug 2020 16:44:36 +0200 Subject: Sheet container: content in a tab --- .../templates/ishtar/sheet_container.html | 177 ++++++++++++--------- 1 file changed, 103 insertions(+), 74 deletions(-) diff --git a/archaeological_warehouse/templates/ishtar/sheet_container.html b/archaeological_warehouse/templates/ishtar/sheet_container.html index 0087eeaf6..a7aa3a512 100644 --- a/archaeological_warehouse/templates/ishtar/sheet_container.html +++ b/archaeological_warehouse/templates/ishtar/sheet_container.html @@ -10,89 +10,118 @@ {% endblock %} {% block content %} -
- {% if item.main_image %} -
- {% include "ishtar/blocks/window_image.html" %} -
- {% endif %} - {% if item.main_image %} -
{#
> #} - {% else %} -
- {% endif %} -

{{ item.container_type|default:"" }} {{ item.reference|default:"" }}

-

{{ item.location.name }} - {{ item.index }}

- {% include "ishtar/blocks/sheet_external_id.html" %} -
- {% if item.main_image %} -
{#
> #} - {% else %} -
- {% endif %} -
-
{% trans "Location" %}
-
- -
-
- {% include "ishtar/blocks/sheet_creation_section.html" %} - {% field_flex "Old reference" item.old_reference %} - {% field_flex_full "Comment" item.comment "
" "
" %} - {% include "ishtar/blocks/sheet_json.html" %} -
-
- -{% with item.container_type as container_type %} -{% if container_type.length or container_type.width or container_type.height or container_type.volume or container_type.reference %} -

{% trans "Container type" %}

-
- {% field_flex "Length (mm)" container_type.length %} - {% field_flex "Width (mm)" container_type.width %} - {% field_flex "Height (mm)" container_type.height %} - {% field_flex "Volume (l)" container_type.volume %} - {% field_flex "Reference" container_type.reference %} -
+{% if output != "ODT" and output != "PDF"%} + {% endif %} -{% endwith %} +
-{% if item.container_content.count or item.children.count %} -

{% trans "Content" %}

+
-{% if item.children.count %} -{% trans "Containers" as container_lbl %} -{% dynamic_table_document container_lbl 'containers' 'parent' item.pk 'TABLE_COLS' output 'large' %} -{% endif %} +
+ {% if item.main_image %} +
+ {% include "ishtar/blocks/window_image.html" %} +
+ {% endif %} + {% if item.main_image %} +
{#
> #} + {% else %} +
+ {% endif %} +

{{ item.container_type|default:"" }} {{ item.reference|default:"" }}

+

{{ item.location.name }} - {{ item.index }}

+ {% include "ishtar/blocks/sheet_external_id.html" %} +
+ {% if item.main_image %} +
{#
> #} + {% else %} +
+ {% endif %} +
+
{% trans "Location" %}
+
+ +
+
+ {% include "ishtar/blocks/sheet_creation_section.html" %} + {% field_flex "Old reference" item.old_reference %} + {% field_flex_full "Comment" item.comment "
" "
" %} + {% include "ishtar/blocks/sheet_json.html" %} +
+
+ {% with item.container_type as container_type %} + {% if container_type.length or container_type.width or container_type.height or container_type.volume or container_type.reference %} +

{% trans "Container type" %}

+
+ {% field_flex "Length (mm)" container_type.length %} + {% field_flex "Width (mm)" container_type.width %} + {% field_flex "Height (mm)" container_type.height %} + {% field_flex "Volume (l)" container_type.volume %} + {% field_flex "Reference" container_type.reference %} +
+ {% endif %} + {% endwith %} + {% if PROFILE.locate_warehouses %} + {% if item.point_2d or item.multi_polygon %} +

{% trans "Localisation"%}

+
+ {% with geo_item=item %} + {% include "ishtar/blocks/sheet_simple_map.html" %} +
+ {% include "ishtar/blocks/sheet_coordinates.html" %} +
+ {% endwith %} +
+ {% endif %} + {% endif %} +
-{% if item.container_content.count %} -{% trans "Finds" as finds_lbl %} -{% dynamic_table_document finds_lbl 'finds_inside_container' 'container' item.pk 'TABLE_COLS' output 'large' %} -{% endif %} +
+ {% if item.container_content.count or item.children.count %} -{% endif %} + {% if item.children.count %} + {% trans "Containers" as container_lbl %} + {% dynamic_table_document container_lbl 'containers' 'parent' item.pk 'TABLE_COLS' output 'large' %} + {% endif %} + + {% if item.container_content.count %} + {% trans "Finds" as finds_lbl %} + {% dynamic_table_document finds_lbl 'finds_inside_container' 'container' item.pk 'TABLE_COLS' output 'large' %} + {% endif %} + + {% else %} + {% trans "Empty" %} + {% endif %} -{% if PROFILE.locate_warehouses %} -{% if item.point_2d or item.multi_polygon %} -

{% trans "Localisation"%}

-
- {% with geo_item=item %} - {% include "ishtar/blocks/sheet_simple_map.html" %} -
- {% include "ishtar/blocks/sheet_coordinates.html" %}
- {% endwith %}
-{% endif %} -{% endif %} + {% endblock %} -- cgit v1.2.3