From 1f87e486e0433608650de1725122f03987941995 Mon Sep 17 00:00:00 2001 From: moanos Date: Fri, 31 May 2024 13:33:42 +0200 Subject: [PATCH] feat: Use location when appropriate, otherwise fallback to location string --- .../details/detail_adoption_notice.html | 13 ++++++++----- .../partials/partial-adoption-notice.html | 8 +++++--- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/src/fellchensammlung/templates/fellchensammlung/details/detail_adoption_notice.html b/src/fellchensammlung/templates/fellchensammlung/details/detail_adoption_notice.html index 3090f43..7ca25f7 100644 --- a/src/fellchensammlung/templates/fellchensammlung/details/detail_adoption_notice.html +++ b/src/fellchensammlung/templates/fellchensammlung/details/detail_adoption_notice.html @@ -16,11 +16,14 @@ {% translate "Weitere Informationen" %} - {% if adoption_notice.location %} - {{ adoption_notice.location.name }}, {{ adoption_notice.location.postcode }} - {% else %} - {% translate "Kein Ort angegeben" %} - {% endif %} + + {% if adoption_notice.location %} + {{ adoption_notice.location }} + {% else %} + {{ adoption_notice.location_string }} + {% endif %} + + {{ adoption_notice.searching_since }} {% if adoption_notice.further_information %} {{ adoption_notice.further_information }} diff --git a/src/fellchensammlung/templates/fellchensammlung/partials/partial-adoption-notice.html b/src/fellchensammlung/templates/fellchensammlung/partials/partial-adoption-notice.html index 0b56793..bbac319 100644 --- a/src/fellchensammlung/templates/fellchensammlung/partials/partial-adoption-notice.html +++ b/src/fellchensammlung/templates/fellchensammlung/partials/partial-adoption-notice.html @@ -4,8 +4,10 @@

{% translate "Notfellchen" %}: {{ adoption_notice.animals.all|join_link:", " | safe }}

@@ -14,7 +16,7 @@ {% if adoption_notice.location %} {{ adoption_notice.location }} {% else %} - {% translate "Keine Ort angegeben" %} + {{ adoption_notice.location_string }} {% endif %}