diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-04-06 12:31:38 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-02-28 12:15:20 +0100 |
commit | 0f96790ca2866d205b262c96ddb1b155abb80ef6 (patch) | |
tree | 1ac684557b5b6d2b7457b80040f8955e0db19d07 /archaeological_warehouse/templates | |
parent | 8b69114b1932329283f3563077a3cb53149af7c8 (diff) | |
download | Ishtar-0f96790ca2866d205b262c96ddb1b155abb80ef6.tar.bz2 Ishtar-0f96790ca2866d205b262c96ddb1b155abb80ef6.zip |
New container localisation - adapt sheets, imports
Diffstat (limited to 'archaeological_warehouse/templates')
-rw-r--r-- | archaeological_warehouse/templates/ishtar/sheet_container.html | 63 |
1 files changed, 43 insertions, 20 deletions
diff --git a/archaeological_warehouse/templates/ishtar/sheet_container.html b/archaeological_warehouse/templates/ishtar/sheet_container.html index ffc533513..1bb004071 100644 --- a/archaeological_warehouse/templates/ishtar/sheet_container.html +++ b/archaeological_warehouse/templates/ishtar/sheet_container.html @@ -1,7 +1,10 @@ {% extends "ishtar/sheet.html" %} -{% load i18n window_header window_field window_tables %} +{% load i18n window_header window_field window_tables link_to_window %} -{% block head_title %}<strong>{% trans "Container" %}</strong> - {{ item.reference|default:"" }} ({{ item.container_type|default:"" }}){% endblock %} +{% block head_title %}<strong>{% trans "Container" %}</strong> - +{{ item.container_type|default:"" }} {{ item.reference|default:"" }} - +{{ item.location.name|default:"" }} +{% endblock %} {% block toolbar %} {% window_nav item window_id 'show-container' 'container_modify' '' '' previous next 1 %} @@ -19,9 +22,8 @@ {% else %} <div class="float-left col-6 col-md-3 text-center"> {% endif %} - <p class="window-refs">{{ item.reference|default:"" }}</p> - <p class="window-refs">{{ item.container_type|default:"" }}</p> - <p class="window-refs">{{ item.responsible.name }} - {{ item.index }}</p> + <p class="window-refs">{{ item.container_type|default:"" }} {{ item.reference|default:"" }}</p> + <p class="window-refs">{{ item.location.name }} - {{ item.index }}</p> <p class="window-refs">{{ item.old_reference|default:"" }}</p> {% include "ishtar/blocks/sheet_external_id.html" %} </div> @@ -30,36 +32,57 @@ {% else %} <div class="float-left row col-6 col-md-8"> {% endif %} - {% field_flex_detail "Responsible warehouse" item.responsible %} - {% field_flex_detail "Location (warehouse)" item.location %} + {% field_flex_detail "Warehouse" item.location %} + {% if item.parent %} + <dl class="col-12 col-md-6 flex-wrap"> + <dt>{% trans "Location" %}</dt> + <dd> + <nav aria-label="breadcrumb"> + <ol class="breadcrumb"> + {% for loca in item.get_localisations %} + <li class="breadcrumb-item"> + {{loca.short_label}} {{loca|simple_link_to_window}} + </li> + {% endfor %} + </ol> + </nav> + </dd> + </dl> + {% endif %} {% include "ishtar/blocks/sheet_creation_section.html" %} - {% field_flex "Location" item.precise_location %} {% field_flex_full "Comment" item.comment "<pre>" "</pre>" %} {% include "ishtar/blocks/sheet_json.html" %} </div> </div> +{% if item.container_content.count or item.children.count %} +<h4>{% trans "Content" %}</h4> + +{% 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 %} + +{% endif %} + +{% if PROFILE.locate_warehouses %} {% if item.point_2d or item.multi_polygon %} <h3>{% trans "Localisation"%}</h3> <div class='row'> + {{item.point_2d}} {% with geo_item=item %} - {% if PROFILE.locate_warehouses %}{% include "ishtar/blocks/sheet_simple_map.html"%}{% endif %} + {% include "ishtar/blocks/sheet_simple_map.html" %} <div class="col-12 col-lg-6 flex-wrap"> - {% if PROFILE.locate_warehouses %}{% include "ishtar/blocks/sheet_coordinates.html"%}{% endif %} + {% include "ishtar/blocks/sheet_coordinates.html" %} </div> {% endwith %} </div> {% endif %} - - -{% if item.finds.count %} -<h4>{% trans "Content" %}</h4> -{% dynamic_table_document finds 'finds' 'container' item.pk 'TABLE_COLS' output 'large' %} -{% endif %} - -{% if item.finds_ref.count %} -<h4>{% trans "Reference content" %}</h4> -{% dynamic_table_document finds 'finds' 'container_ref' item.pk 'TABLE_COLS' output 'large' %} {% endif %} {% endblock %} |