From 52257bb404da82db28d497c3ece6de4b959e1fb9 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Fri, 17 Apr 2020 13:20:42 +0200 Subject: Fix statistics for warehouse --- .../templates/ishtar/sheet_warehouse.html | 251 ++++++++++++--------- .../ishtar/wizard/wizard_warehouse_divisions.html | 2 +- 2 files changed, 148 insertions(+), 105 deletions(-) (limited to 'archaeological_warehouse/templates') diff --git a/archaeological_warehouse/templates/ishtar/sheet_warehouse.html b/archaeological_warehouse/templates/ishtar/sheet_warehouse.html index feb8b786a..1307425ff 100644 --- a/archaeological_warehouse/templates/ishtar/sheet_warehouse.html +++ b/archaeological_warehouse/templates/ishtar/sheet_warehouse.html @@ -8,124 +8,167 @@ {% block content %} -
-
-
- {% include "ishtar/blocks/window_image.html" %} -
-

-

- {{ item.name|default:"" }} -

-

- {{ item.warehouse_type|default:"" }} -

- {% include "ishtar/blocks/sheet_external_id.html" %} -

+ +{% if output != "ODT" and output != "PDF"%} + +{% endif %} + +
+ +
+
+
+
+ {% include "ishtar/blocks/window_image.html" %} +
+
+

+ {{ item.name|default:"" }} +

+

+ {{ item.warehouse_type|default:"" }} +

+ {% include "ishtar/blocks/sheet_external_id.html" %} +
+
+
-
-
-
- {% include "ishtar/blocks/sheet_creation_section.html" %} - {% field_flex_detail "Person in charge" item.person_in_charge %} - {% field_flex_detail "Organization" item.organization %} - {% trans "Default divisions" as def_div_label %} - {% field_flex def_div_label item.location_types|join:", " %} - {% field_flex_full "Comment" item.comment "
" "
" %} - {% include "ishtar/blocks/sheet_json.html" %} -
+
+ {% include "ishtar/blocks/sheet_creation_section.html" %} + {% field_flex_detail "Person in charge" item.person_in_charge %} + {% field_flex_detail "Organization" item.organization %} + {% trans "Default divisions" as def_div_label %} + {% field_flex def_div_label item.location_types|join:", " %} + {% field_flex_full "Comment" item.comment "
" "
" %} + {% include "ishtar/blocks/sheet_json.html" %} +
-{% if item.point_2d or item.multi_polygon or item.get_address or item.get_address_complement or item.get_postal_code or item.get_town %} -

{% trans "Localisation"%}

-
- {% with geo_item=item %} - {% if PROFILE.locate_warehouses %}{% include "ishtar/blocks/sheet_simple_map.html"%}{% endif %} -
- {% if PROFILE.locate_warehouses %}{% include "ishtar/blocks/sheet_coordinates.html"%}{% endif %} - {% with full=True %}{% include "ishtar/blocks/sheet_address_section.html" %}{% endwith %} + {% if item.point_2d or item.multi_polygon or item.get_address or item.get_address_complement or item.get_postal_code or item.get_town %} +

{% trans "Localisation"%}

+
+ {% with geo_item=item %} + {% if PROFILE.locate_warehouses %}{% include "ishtar/blocks/sheet_simple_map.html"%}{% endif %} +
+ {% if PROFILE.locate_warehouses %}{% include "ishtar/blocks/sheet_coordinates.html"%}{% endif %} + {% with full=True %}{% include "ishtar/blocks/sheet_address_section.html" %}{% endwith %} +
+ {% endwith %} +
+ {% endif %}
- {% endwith %} -
-{% endif %} - -{% if item.containers.count %} -

{% trans "Containers" %}

-{% dynamic_table_document '' 'containers' 'location_id' item.pk 'TABLE_COLS' output %} -{% endif %} +
+ {% if item.containers.count %} +

{% trans "Containers" %}

+ {% dynamic_table_document '' 'containers' 'location_id' item.pk 'TABLE_COLS' output %} + {% else %} +
+ + {% trans "No container inside this warehouse" %} +
+ {% endif %} +
-

{% trans "Statistics" %}

-{% trans "These numbers are updated hourly" %} - -

{% trans "Finds" %}

-
- {% trans "Number of attached finds" as number_of_attached_finds_label %} - {% field_flex_2 number_of_attached_finds_label item.number_of_finds %} - {% trans "Number of hosted finds" as number_of_hosted_finds_label %} - {% field_flex_2 number_of_hosted_finds_label item.number_of_finds_hosted %} -
+
+

{% trans "Statistics" %}

+ {% trans "These numbers are updated hourly" %} + +

{% trans "Finds" %}

+
+ {% trans "Number of attached finds" as number_of_attached_finds_label %} + {% field_flex_2 number_of_attached_finds_label item.number_of_finds %} + {% trans "Number of hosted finds" as number_of_hosted_finds_label %} + {% field_flex_2 number_of_hosted_finds_label item.number_of_finds_hosted %} +
-{% if item.number_of_finds_by_place %} -

{% trans "Finds by location in the warehouse" %}

-{% for items in item.number_of_finds_by_place %} -{% if items %} - - - {% for location_type in item.location_types %} - {% endfor %} - - - - - {% for item in items %} - - {% for local in item.0 %}{% endfor %} - - - {% endfor %} - -
{{location_type|title}}{% trans "Total" %}
{{local}}{{item.1}}
-{% endif %} -{% endfor %} -{% endif %} + {% if item.number_of_finds_by_place %} +

{% trans "Finds by location in the warehouse" %}

+ {% for items in item.number_of_finds_by_place %} + {% if items %} + + + {% for location_type in item.location_types %} + {% endfor %} + + + + + {% for item in items %} + + {% for local in item.0 %}{% endfor %} + + + {% endfor %} + +
{{location_type|title}}{% trans "Total" %}
{{local}}{{item.1}}
+ {% endif %} + {% endfor %} + {% endif %} + +

{% trans "Containers" %}

+
+ {% trans "Number of containers" as number_of_containers_label %} + {% field_flex_2 number_of_containers_label item.number_of_containers %} +
-

{% trans "Containers" %}

-
- {% trans "Number of containers" as number_of_containers_label %} - {% field_flex_2 number_of_containers_label item.number_of_containers %} + {% if item.number_of_containers_by_place %} +

{% trans "Containers by location in the warehouse" %}

+ {% for items in item.number_of_containers_by_place %} + {% if items %} + + + {% for location_type in item.location_types %} + {% endfor %} + + + + + {% for item in items %} + + {% for local in item.0 %}{% endfor %} + + + {% endfor %} + +
{{location_type|title}}{% trans "Total" %}
{{local}}{{item.1}}
+ {% endif %} + {% endfor %} + {% endif %} +
-{% if item.number_of_containers_by_place %} -

{% trans "Containers by location in the warehouse" %}

-{% for items in item.number_of_containers_by_place %} -{% if items %} - - - {% for location_type in item.location_types %} - {% endfor %} - - - - - {% for item in items %} - - {% for local in item.0 %}{% endfor %} - - - {% endfor %} - -
{{location_type|title}}{% trans "Total" %}
{{local}}{{item.1}}
-{% endif %} -{% endfor %} -{% endif %} -