From 88a34731869dc7156f06f5856552c12a0d7d742c Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 24 Jan 2023 16:37:18 +0100 Subject: Sheet treatment: improve layout - add detail links --- .../templates/ishtar/sheet_find.html | 5 ++-- .../templates/ishtar/sheet_treatment.html | 28 ++++++++++++++-------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html index d72d26b12..9cfcfe707 100644 --- a/archaeological_finds/templates/ishtar/sheet_find.html +++ b/archaeological_finds/templates/ishtar/sheet_find.html @@ -31,6 +31,7 @@ {% with can_view_documents=permission_view_own_document|or_:permission_view_document %} {% with display_documents=can_view_documents|and_:item.documents_count %} {% with display_geo=item.geodata.count %} +{% with has_image=item.images_number %} {% if output != "ODT" and output != "PDF"%} +{% with has_image=item.images_number %}
+ {% if has_image %} +
+
+ {% include "ishtar/blocks/window_image.html" %} + {% else %}
- {% include "ishtar/blocks/window_image.html" %} + {% endif %}
+

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

{% if item.other_reference %}

{{ item.other_reference }}

{% endif %} @@ -67,20 +74,19 @@
-
-
+ {% if not has_image %}
{% endif %}
{% field_flex_multiple_obj "Treatment type" item 'treatment_types' %} {% field_flex "State" item.treatment_state %} {% field_flex_detail "Associated request" item.file %} - {% field_flex "Location" item.location %} - {% field_flex "Container" item.container %} - {% field_flex "Scientific monitoring manager" item.scientific_monitoring_manager %} - {% field_flex "Responsible" item.person %} - {% field_flex "Organization" item.organization %} - {% field_flex "Start date" item.start_date %} - {% field_flex "Closing date" item.end_date %} + {% field_flex_detail "Location" item.location %} + {% field_flex_detail "Container" item.container %} + {% field_flex_detail "Scientific monitoring manager" item.scientific_monitoring_manager %} + {% field_flex_detail "Responsible" item.person %} + {% field_flex_detail "Organization" item.organization %} + {% field_flex "Start date" item.start_date|date:"DATE_FORMAT" %} + {% field_flex "Closing date" item.end_date|date:"DATE_FORMAT" %} {% field_flex "Estimated cost" item.estimated_cost|intcomma '' " "|add:CURRENCY %} {% field_flex "Quoted cost" item.quoted_cost|intcomma '' " "|add:CURRENCY %} {% field_flex "Realized cost" item.realized_cost|intcomma '' " "|add:CURRENCY %} @@ -91,6 +97,7 @@ {% include "ishtar/blocks/sheet_json.html" %}
+ {% if has_image %}
{% endif %}
+{% endwith %} {% endblock %} -- cgit v1.2.3