From a0fdc09ccf429c1473775ff04e1643224d877e20 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Thu, 13 Jul 2023 10:30:03 +0200 Subject: 🐛 fix find redirection after geo item creation/modification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archaeological_finds/templates/ishtar/sheet_find.html | 2 ++ changelog/en/changelog_2022-06-15.md | 2 ++ changelog/fr/changelog_2023-01-25.md | 3 +++ ishtar_common/templates/ishtar/blocks/sheet_geographic.html | 8 ++++++-- 4 files changed, 13 insertions(+), 2 deletions(-) diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html index 42d7a41b9..076c20c47 100644 --- a/archaeological_finds/templates/ishtar/sheet_find.html +++ b/archaeological_finds/templates/ishtar/sheet_find.html @@ -543,6 +543,7 @@ role="tabpanel" aria-labelledby="{{window_id}}-geodata-tab">

{% trans "Geographic data" %}

+ {% with find_id=item.pk %} {% for base_find in item.base_finds.all %} {% with geo_item=base_find %}

{% if base_find.complete_identifier %}{{ base_find.complete_identifier }}{% else %}{{base_find.short_id}}{% endif %}

@@ -550,6 +551,7 @@ {% include "ishtar/blocks/sheet_geographic.html" %} {% endwith %} {% endwith %} {% endfor %} + {% endwith %} {% endif %} diff --git a/changelog/en/changelog_2022-06-15.md b/changelog/en/changelog_2022-06-15.md index d9004ce38..b7ddf95cf 100644 --- a/changelog/en/changelog_2022-06-15.md +++ b/changelog/en/changelog_2022-06-15.md @@ -8,6 +8,8 @@ v4.0.54 - 2099-12-31 - open registration form: disabled by default - reset email form +### Bug fixes ### +- fix find redirection after geo item creation/modification v4.0.53 - 2023-07-06 -------------------- diff --git a/changelog/fr/changelog_2023-01-25.md b/changelog/fr/changelog_2023-01-25.md index 04554b387..0bc164e75 100644 --- a/changelog/fr/changelog_2023-01-25.md +++ b/changelog/fr/changelog_2023-01-25.md @@ -8,6 +8,9 @@ v4.0.54 - 2099-12-31 - formulaire d'inscription ouvert : désactivé par défaut - formulaire de réinitialisation de mot de passe par courriel +### Corrections de dysfonctionnements ### +- correction de redirection sur le mobilier après ajout/édition d'élement géographique + v4.0.53 - 2023-07-06 -------------------- diff --git a/ishtar_common/templates/ishtar/blocks/sheet_geographic.html b/ishtar_common/templates/ishtar/blocks/sheet_geographic.html index eeb618bfe..c48811de0 100644 --- a/ishtar_common/templates/ishtar/blocks/sheet_geographic.html +++ b/ishtar_common/templates/ishtar/blocks/sheet_geographic.html @@ -16,7 +16,9 @@ {% for geo in geo_item.geodata.all %} {% if not IS_HISTORY and permission_change_geo %} - {% if geo|can_edit_item:request %}{% else %}–{% endif %} + {% autoescape off %} + {% if geo|can_edit_item:request %}{% else %}–{% endif %} + {% endautoescape %} {% endif %} {% if geo.id == geo_item.main_geodata_id %}{% else %}–{% endif %} {% if geo.data_type %}{{ geo.data_type }}{% else %}-{% endif %} @@ -27,9 +29,11 @@ {% if geo.provider %}{{ geo.provider }}{% else %}-{% endif %} {% if geo.comment %}{{ geo.comment }}{% else %}-{% endif %} {% if not IS_HISTORY and permission_change_geo and output != "ODT" and output != "PDF" %} + {% autoescape off %} + href="{% url 'delete-geo' geo.pk %}{% if search_url or find_id %}?{% endif %}{% if find_id %}find_id={{find_id|unlocalize}}&{% endif %}{% if search_url %}back_url={{search_url}}%3Fopen_item={{geo_item.pk|unlocalize}}{% endif %}"> {% if geo|can_edit_item:request %}{% else %}–{% endif %} + {% endautoescape %} {% endif %} {% endfor %} -- cgit v1.2.3