From f3830e9114993c0619b099a55ae515f5ceb70bf0 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 10 Dec 2020 23:08:45 +0100 Subject: Display operation name and town if no associated site --- showcase/templates/showcase/item-find.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/showcase/templates/showcase/item-find.html b/showcase/templates/showcase/item-find.html index 0659e5f..30a571e 100644 --- a/showcase/templates/showcase/item-find.html +++ b/showcase/templates/showcase/item-find.html @@ -73,11 +73,17 @@
+ {% with data.base_finds.0.context_record as context_record %} {% with data.base_finds.0.context_record.site as site %} {% with data.base_finds.0.context_record.operation as operation %}

{% trans "Archaeological site / Operation" %}

+ {% if site.name %}

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

+ {% else %} +

{{operation.common_name}} +
{{context_record.town}}

+ {% endif %} {% 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 %}

@@ -90,6 +96,7 @@ {% endif %} {% endwith %} {% endwith %} + {% endwith %}
-- cgit v1.2.3