From 5f8d692a804be6d4e0689a3c4c8ba71b0ce82f2b Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 2 Oct 2018 01:23:43 +0200 Subject: Sheet refactoring with images --- .../templates/ishtar/sheet_contextrecord.html | 84 +++++++++++++--------- 1 file changed, 49 insertions(+), 35 deletions(-) (limited to 'archaeological_context_records/templates') diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html index c605addb9..2ad74b7d2 100644 --- a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html +++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html @@ -9,49 +9,56 @@ {% block content %} -
-
-
- {% include "ishtar/blocks/window_image.html" %} -
-

-

{{ item.parcel.short_label }}

-

{{ item.label|default:"" }}

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

-
+
+
+ {% include "ishtar/blocks/window_image.html" %} +
+

+

{{ item.parcel.short_label }}

+

{{ item.label|default:"" }}

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

-
-
- {% field_flex "Complete ID" item.full_label %} - {% include "ishtar/blocks/sheet_creation_section.html" %} - {% field_flex "Type" item.unit %} - {% field_flex "Excavation technic" item.excavation_technic %} - {% field_flex_multiple "Chronology" item.datings %} - {% field_flex "Town" item.town.label_with_areas %} - {% field_flex_multiple "Documentation" item.documentations %} - {% field_flex "Opening date" item.opening_date %} - {% field_flex "Closing date" item.closing_date %} - {% field_flex_full "Comment on datings" item.datings_comment "
" "
" %} +
+ {% field_flex_2 "Complete ID" item.full_label %} + {% field_flex_2 "Type" item.unit %} + {% with has_image=item.images.count %} + + {% if not has_image %} +
+
+ {% endif %} -{% include "ishtar/blocks/sheet_json.html" %} + {% field_flex "Excavation technic" item.excavation_technic '' '' has_image %} + {% field_flex_multiple "Chronology" item.datings has_image %} + {% field_flex "Town" item.town.label_with_areas '' '' has_image %} + {% field_flex_multiple "Documentation" item.documentations has_image %} + {% field_flex "Opening date" item.opening_date '' '' has_image %} + {% field_flex "Closing date" item.closing_date '' '' has_image %} + {% field_flex_full "Comment on datings" item.datings_comment "
" "
" has_image %} +
-{% if item.diameter or item.depth_of_appearance or item.documentations.count or item.description or item.lenght or item.width or item.depth or item.thickness or item.comment %} -

{% trans "Description"%}

-
- {% field_flex_full "Description" item.description "
" "
" %} - {% field_flex_full "Comment" item.comment "
" "
" %} - {% field_flex "Length (m)" item.lenght %} - {% field_flex "Width (m)" item.width %} - {% field_flex "Diameter (m)" item.diameter %} - {% field_flex "Depth (m)" item.depth %} - {% field_flex "Thickness (m)" item.thickness %} - {% field_flex "Depth of appearance (m)" item.depth_of_appearance %} + {% if item.diameter or item.depth_of_appearance or item.documentations.count or item.description or item.lenght or item.width or item.depth or item.thickness or item.comment %} +

{% trans "Description"%}

+
+ {% field_flex_full "Description" item.description "
" "
" has_image %} + {% field_flex_full "Comment" item.comment "
" "
" has_image %} + {% field_flex "Length (m)" item.lenght '' '' has_image %} + {% field_flex "Width (m)" item.width '' '' has_image %} + {% field_flex "Diameter (m)" item.diameter '' '' has_image %} + {% field_flex "Depth (m)" item.depth '' '' has_image %} + {% field_flex "Thickness (m)" item.thickness '' '' has_image %} + {% field_flex "Depth of appearance (m)" item.depth_of_appearance '' '' has_image %} +
+ {% endif %} + +{% if has_image %}
{% endif %} +{% endwith %} {% if item.activity or item.identification or item.interpretation %}

{% trans "Interpretation"%}

@@ -74,6 +81,13 @@
{% endif %} +

{% trans "Sheet"%}

+
+ {% include "ishtar/blocks/sheet_creation_section.html" %} +
+ +{% include "ishtar/blocks/sheet_json.html" %} + {% trans "Context record relations" as cr_rels %} {% if item.right_relations.count %} {% dynamic_table_document cr_rels 'context_records_relations' 'left_record_id' item.pk '' output %} -- cgit v1.2.3