From e1ab754e554cc4ce98e7a79897d16cfe5c53c765 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_operation.html | 127 ++++++++++++--------- 1 file changed, 71 insertions(+), 56 deletions(-) (limited to 'archaeological_operations') diff --git a/archaeological_operations/templates/ishtar/sheet_operation.html b/archaeological_operations/templates/ishtar/sheet_operation.html index 91c1501ec..733b0b39a 100644 --- a/archaeological_operations/templates/ishtar/sheet_operation.html +++ b/archaeological_operations/templates/ishtar/sheet_operation.html @@ -9,9 +9,10 @@ {% block content %} -
-
-
+

{% trans "General"%}

+ +
+
{% include "ishtar/blocks/window_image.html" %}
@@ -25,66 +26,75 @@

-

{{item.common_name|default:''}}

-

{{item.address|default:''}}

+

{{item.common_name|default:''}}

+

{{item.address|default:''}}

-
-
- -

{% trans "General"%}

-
- {% field_flex "Old code" item.old_code %} - {% include "ishtar/blocks/sheet_creation_section.html" %} - {% trans "Begining date" as begining_date_label %} - {% field_flex begining_date_label item.start_date|date:"DATE_FORMAT" %} - {% field_flex "Excavation end date" item.excavation_end_date|date:"DATE_FORMAT"|default:"-" %} - {% field_flex_detail "Head scientist" item.scientist %} - {% field_flex_detail "In charge" item.in_charge %} - {% field_flex_multiple "Collaborators" item.collaborators %} - {% field_flex_detail "Operator" item.operator %} -
-
{%trans "State"%}
-
- {% if item.is_active %}{%trans "Active file"%} - {% else %}{%trans "Closed operation"%}{% endif %} -
-
- {% if item.closing.date %} -
-
{%trans "Closing date"%}
-
- {{ item.closing.date }} {%trans "by" %} {{ item.closing.user }} -
+
+ {% field_flex_2 "Old code" item.old_code %} + {% trans "Begining date" as begining_date_label %} + {% field_flex_2 begining_date_label item.start_date|date:"DATE_FORMAT" %} + {% field_flex_2 "Excavation end date" item.excavation_end_date|date:"DATE_FORMAT"|default:"-" %} + {% with has_image=item.images.count %} + {% if not has_image %}
- {% endif %} - {% field_flex "Type" item.operation_type %} - {% if item.surface %} -
-
{%trans "Surface"%}
-
- {{ item.surface }} m2 ({{ item.surface_ha }} ha) -
-
- {% endif %} - {% if item.cost %} -
-
{%trans "Cost" %}
-
- {{ item.cost }} €{% if item.cost_by_m2 %}, ({{ item.cost_by_m2 }} €/m2){%endif%} -
+
+
+ {% endif %} + + {% field_flex_detail "Head scientist" item.scientist has_image %} + {% field_flex_detail "In charge" item.in_charge has_image %} + {% field_flex_multiple "Collaborators" item.collaborators has_image %} + {% field_flex_detail "Operator" item.operator has_image %} +
+
{%trans "State"%}
+
+ {% if item.is_active %}{%trans "Active file"%} + {% else %}{%trans "Closed operation"%}{% endif %} +
+
+ {% if item.closing.date %} +
+
{%trans "Closing date"%}
+
+ {{ item.closing.date }} {%trans "by" %} {{ item.closing.user }} +
+
+ {% endif %} + {% field_flex_2 "Type" item.operation_type %} + {% if item.surface %} +
+
{%trans "Surface"%}
+
+ {{ item.surface }} m2 ({{ item.surface_ha }} ha) +
+
+ {% endif %} + {% if item.cost %} +
+
{%trans "Cost" %}
+
+ {{ item.cost }} €{% if item.cost_by_m2 %}, ({{ item.cost_by_m2 }} €/m2){%endif%} +
+
+ {% endif %} + {% if item.duration %} +
+
{%trans "Duration"%}
+
+ {{ item.duration }} {% trans "days" %} +
+
+ {% endif %} + {% if has_image %}
- {%endif%} - {% if item.duration %} -
-
{%trans "Duration"%}
-
- {{ item.duration }} {% trans "days" %} -
+ {% endif %} + {% endwith %}
- {%endif%} +
+
{% field_flex_multiple "Remains" item.remains %} {% field_flex_multiple "Periods" item.periods %} {% field_flex "Record quality" item.record_quality_type %} @@ -116,6 +126,11 @@ {% field_flex_full "Comment about scientific documentation" item.scientific_documentation_comment "
" "
" %}
+

{% trans "Sheet"%}

+
+ {% include "ishtar/blocks/sheet_creation_section.html" %} +
+ {% include "ishtar/blocks/sheet_json.html" %} {% if item.virtual_operation %} -- cgit v1.2.3