{% extends "ishtar/sheet.html" %} {% load i18n ishtar_helpers window_header window_field window_tables link_to_window %} {% block head_title %}{% trans "Container" %} - {{ item.reference|default:"" }} ({{ item.container_type|default:"" }}) - {{item.location}} {% endblock %} {% block toolbar %} {% window_nav item window_id 'show-container' 'container_modify' '' '' previous next 1 %} {% endblock %} {% block content %} {% with can_view_documents=permission_view_own_document|or_:permission_view_document %} {% with has_documents=item.documents.count %} {% with display_documents=can_view_documents|and_:has_documents %} {% if output != "ODT" and output != "PDF"%} {% endif %}
{% if item.main_image %}
{% include "ishtar/blocks/window_image.html" %}
{% endif %} {% if item.main_image %}
{#
> #} {% else %}
{% endif %} {% if item.complete_identifier %}

{{ item.complete_identifier }}

{% endif %}

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

{% include "ishtar/blocks/sheet_external_id.html" %}
{% if item.main_image %}
{#
> #} {% else %}
{% endif %}
{% trans "Location" %}
{% trans "Number of containers" %}
{{item.number_containers}}
{% trans "Number of divisions" %}
{{item.number_divisions}}
{% trans "Number of finds" %}
{{item.number_of_finds_hosted}}
{% trans "Number of owned finds" %}
{{item.number_of_finds}}
{% if item.responsibility != item.location %} {% field_flex_detail "Responsibility" item.responsibility %} {% endif %} {% 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 "Type" container_type.label %} {% 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 or item.children.count or item.contained_documents.count %} {% if item.children.count %}

{% trans "Divisions" %}

{% dynamic_table_document '' 'divisions' 'container_tree_child__container_parent__id' item.pk 'TABLE_COLS' output %}

{% trans "Containers" %}

{% dynamic_table_document '' 'non-divisions' 'container_tree_child__container_parent__id' item.pk 'TABLE_COLS' output %} {% endif %} {% if item.container_content.count %}

{% trans "Finds" %}

{% dynamic_table_document '' 'finds_inside_container' 'container' item.pk 'TABLE_COLS' output 'large' %} {% endif %} {% if item.contained_documents.count %} {% trans "Documents" as document_lbl %} {% dynamic_table_document document_lbl 'documents' 'container_id' item.pk 'TABLE_COLS' output 'large' %} {% endif %} {% else %}
 {% trans "Empty" %}
{% endif %}

{% trans "Statistics" %}

{% with item.last_stats_update as last_stats_update%} {% if last_stats_update %} {% trans "Last update:" %} {{last_stats_update}} {% endif %}{% endwith %}
{% if not item.number_containers and not item.number_divisions %}
 {% trans "No container/division inside this container." %}
{% else %}

{% trans "Finds" %}

{% trans "Finds by location" %}

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

{% trans "Containers by location" %}

{% for items in item.number_of_containers_by_place %} {% if items %} {% for location_type in item.division_labels %} {% endfor %} {% for item in items %} {% for local in item.0 %}{% endfor %} {% endfor %}
{{location_type|title}}{% trans "Total" %}
{{local|safe}}{{item.1}}
{% endif %} {% endfor %} {% endif %} {% endif %}
{% 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 %}
{% endif %}
{% endwith %} {% endwith %} {% endwith %} {% endblock %}