summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2023-01-24 16:37:18 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2023-01-24 16:37:18 +0100
commit88a34731869dc7156f06f5856552c12a0d7d742c (patch)
tree674a7f47d48d27154e0f564f15e50e1b3c944b5a
parent317eac2260878c4801251ab53b82274c474c4f53 (diff)
downloadIshtar-88a34731869dc7156f06f5856552c12a0d7d742c.tar.bz2
Ishtar-88a34731869dc7156f06f5856552c12a0d7d742c.zip
Sheet treatment: improve layout - add detail links
-rw-r--r--archaeological_finds/templates/ishtar/sheet_find.html5
-rw-r--r--archaeological_finds/templates/ishtar/sheet_treatment.html28
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"%}
<ul class="nav nav-tabs" id="{{window_id}}-tabs" role="tablist">
@@ -91,7 +92,6 @@
<div class="tab-pane fade show active" id="{{window_id}}-basefind"
role="tabpanel" aria-labelledby="{{window_id}}-basefind-tab">
- {% with has_image=item.images_number %}
{% if has_image %}
<div class="clearfix">
<div class="card float-left col-12 col-md-6 col-lg-4">
@@ -141,7 +141,6 @@
{% if has_image %}
</div>
{% endif %}
- {% endwith %}
</div>
<div class="tab-pane fade" id="{{window_id}}-identification"
@@ -564,7 +563,7 @@
{% endif %}
</div>
-{% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}
+{% endwith %} {% endwith %} {% endwith %} {% endwith %} {% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}{% endwith %}
{% endblock %}
diff --git a/archaeological_finds/templates/ishtar/sheet_treatment.html b/archaeological_finds/templates/ishtar/sheet_treatment.html
index c82ba53f5..b5025b3fe 100644
--- a/archaeological_finds/templates/ishtar/sheet_treatment.html
+++ b/archaeological_finds/templates/ishtar/sheet_treatment.html
@@ -44,15 +44,22 @@
{% endif %}
</ul>
+{% with has_image=item.images_number %}
<div class="tab-content" id="{{window_id}}-tab-content">
<div class="tab-pane fade show active" id="{{window_id}}-treatment"
role="tabpanel" aria-labelledby="{{window_id}}-treatment-tab">
+ {% if has_image %}
+ <div class="clearfix">
+ <div class="card float-left col-12 col-md-6 col-lg-4">
+ {% include "ishtar/blocks/window_image.html" %}
+ {% else %}
<div class="row">
<div class="offset-lg-4 col-lg-4 offset-md-3 col-md-6 offset-sm-1 col-sm-10 col-12">
<div class="card">
- {% include "ishtar/blocks/window_image.html" %}
+ {% endif %}
<div class="card-body">
<div class="card-text">
+
<p class="window-refs">{{ item.label|default:"" }}</p>
{% if item.other_reference %}
<p class="window-refs">{{ item.other_reference }}</p>{% endif %}
@@ -67,20 +74,19 @@
</div>
</div>
</div>
- </div>
- </div>
+ {% if not has_image %}</div></div>{% endif %}
<div class="row">
{% 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" %}
</div>
+ {% if has_image %}</div>{% endif %}
</div>
<div class="tab-pane fade" id="{{window_id}}-find"
@@ -136,4 +143,5 @@
</div>
+{% endwith %}
{% endblock %}