From 94a31eff623d9be6d5902118319bf8ecc48558da Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Tue, 27 Aug 2019 17:05:07 +0200 Subject: Better layout for find page --- showcase/templates/showcase/item-find.html | 79 ++++++++++++++++-------------- 1 file changed, 43 insertions(+), 36 deletions(-) diff --git a/showcase/templates/showcase/item-find.html b/showcase/templates/showcase/item-find.html index e3f0f43..e43b1b5 100644 --- a/showcase/templates/showcase/item-find.html +++ b/showcase/templates/showcase/item-find.html @@ -41,48 +41,55 @@
+
{% if data.images.0.thumbnail %} -
+
{% endif %} -

{{data.denomination}}

+ {% if data.images.0.thumbnail %} +
+ {% else %} +
+ {% endif %} +

{{data.denomination}}

-
- {% if data.public_description %} -
{{data.public_description|linebreaks}}
- {% elif data.description %} -
{{data.description|linebreaks}}
- {% endif %} - {% if data.object_types|length %} -

{% trans "Object type:" %} {{data.object_types|join:" ; "}}

- {% endif %} - {% if data.materials|length %} -

{% trans "Materials:" %} {{data.materials|join:" ; "}}

- {% endif %} - {% if data.datings|length %}

{% trans "Period(s):" %} - {% for dating in data.datings %}{% if forloop.counter0 %} ; {% endif %}{{dating.period}}{% endfor %} -

{% endif %} -
+
+ {% if data.public_description %} +
{{data.public_description|linebreaks}}
+ {% elif data.description %} +
{{data.description|linebreaks}}
+ {% endif %} + {% if data.object_types|length %} +

{% trans "Object type:" %} {{data.object_types|join:" ; "}}

+ {% endif %} + {% if data.materials|length %} +

{% trans "Materials:" %} {{data.materials|join:" ; "}}

+ {% endif %} + {% if data.datings|length %}

{% trans "Period(s):" %} + {% for dating in data.datings %}{% if forloop.counter0 %} ; {% endif %}{{dating.period}}{% endfor %} +

{% endif %} +
-
- {% with data.base_finds.0.context_record.site as site %} - {% with data.base_finds.0.context_record.operation as operation %} -

{% trans "Archaeological site / Operation" %}

-

{{site.name}} {% if site.discovery_date %}({{site.discovery_date}}){% endif %} -
{{site.towns.0}}

- {% if operation.year %}

{% trans "Year of the survey:" %} {{operation.year}}

{% endif %} - {% if site.shipwreck_name %}

{% trans "Shipwreck" %} : {{site.shipwreck_name}} - {% if site.sinking_date %} {% trans "sinking" %} {{site.sinking_date}}{% endif %}

- {% endif %} - {% if site.periods|length %} -

{% trans "Period(s):" %} {{site.periods|join:" ; "}}

- {% endif %} - {% if site.remains|length %} -

{% trans "Remain(s):" %} {{site.remains|join:" ; "}}

- {% endif %} - {% endwith %} - {% endwith %} +
+ {% with data.base_finds.0.context_record.site as site %} + {% with data.base_finds.0.context_record.operation as operation %} +

{% trans "Archaeological site / Operation" %}

+

{{site.name}} {% if site.discovery_date %}({{site.discovery_date}}){% endif %} +
{{site.towns.0}}

+ {% if operation.year %}

{% trans "Year of the survey:" %} {{operation.year}}

{% endif %} + {% if site.shipwreck_name %}

{% trans "Shipwreck" %} : {{site.shipwreck_name}} + {% if site.sinking_date %} {% trans "sinking" %} {{site.sinking_date}}{% endif %}

+ {% endif %} + {% if site.periods|length %} +

{% trans "Period(s):" %} {{site.periods|join:" ; "}}

+ {% endif %} + {% if site.remains|length %} +

{% trans "Remain(s):" %} {{site.remains|join:" ; "}}

+ {% endif %} + {% endwith %} + {% endwith %} +
-- cgit v1.2.3