diff options
author | Étienne Loks <etienne@peacefrogs.net> | 2020-12-10 23:08:45 +0100 |
---|---|---|
committer | Étienne Loks <etienne@peacefrogs.net> | 2020-12-10 23:08:45 +0100 |
commit | f3830e9114993c0619b099a55ae515f5ceb70bf0 (patch) | |
tree | 7e7fcf42b98675c0dec1e9b7d4f22a72be2b7baa | |
parent | c6319cd8727df62d75a1670a9b249582a515b9f6 (diff) | |
download | ishtar-pergamon-f3830e9114993c0619b099a55ae515f5ceb70bf0.tar.bz2 ishtar-pergamon-f3830e9114993c0619b099a55ae515f5ceb70bf0.zip |
Display operation name and town if no associated site
-rw-r--r-- | showcase/templates/showcase/item-find.html | 7 |
1 files changed, 7 insertions, 0 deletions
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 @@ </div> <div class="mt-2 bs-callout bs-callout-xl bs-callout-primary"> + {% 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 %} <h4>{% trans "Archaeological site / Operation" %}</h4> + {% if site.name %} <p>{{site.name}} {% if site.discovery_date %}({{site.discovery_date}}){% endif %} <br><small>{{site.towns.0}}</small></p> + {% else %} + <p>{{operation.common_name}} + <br><small>{{context_record.town}}</small></p> + {% endif %} {% if operation.year %}<p><em>{% trans "Year of the survey:" %}</em> {{operation.year}}</p>{% endif %} {% if site.shipwreck_name %}<p><em>{% trans "Shipwreck" %} : </em>{{site.shipwreck_name}} {% if site.sinking_date %} <em>{% trans "sinking" %}</em> {{site.sinking_date}}{% endif %}</p> @@ -90,6 +96,7 @@ {% endif %} {% endwith %} {% endwith %} + {% endwith %} </div> </div> </div> |