summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2023-07-13 10:30:03 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2023-07-13 10:30:03 +0200
commita0fdc09ccf429c1473775ff04e1643224d877e20 (patch)
treed70dbab95ccdfcbe4c15f8e4d90315da9fb6182c
parent939bb82df4a993502d39bfb852b348547746cafa (diff)
downloadIshtar-a0fdc09ccf429c1473775ff04e1643224d877e20.tar.bz2
Ishtar-a0fdc09ccf429c1473775ff04e1643224d877e20.zip
🐛 fix find redirection after geo item creation/modification
-rw-r--r--archaeological_finds/templates/ishtar/sheet_find.html2
-rw-r--r--changelog/en/changelog_2022-06-15.md2
-rw-r--r--changelog/fr/changelog_2023-01-25.md3
-rw-r--r--ishtar_common/templates/ishtar/blocks/sheet_geographic.html8
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">
<h3>{% trans "Geographic data" %}</h3>
+ {% with find_id=item.pk %}
{% for base_find in item.base_finds.all %}
{% with geo_item=base_find %}
<h4>{% if base_find.complete_identifier %}{{ base_find.complete_identifier }}{% else %}{{base_find.short_id}}{% endif %}</h4>
@@ -550,6 +551,7 @@
{% include "ishtar/blocks/sheet_geographic.html" %}
{% endwith %} {% endwith %}
{% endfor %}
+ {% endwith %}
</div>
{% 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 %}
<tr>
{% if not IS_HISTORY and permission_change_geo %}<td>
- <a title="{% trans 'Edit' %}" href="{% url 'edit-geo' geo.pk %}{% if search_url %}?back_url={{search_url}}%3Fopen_item={{geo_item.pk|unlocalize}}{% endif %}">{% if geo|can_edit_item:request %}<i class="fa fa-pencil"></i></a>{% else %}&ndash;{% endif %}
+ {% autoescape off %}
+ <a title="{% trans 'Edit' %}" href="{% url 'edit-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 %}<i class="fa fa-pencil"></i></a>{% else %}&ndash;{% endif %}
+ {% endautoescape %}
</td>{% endif %}
<td>{% if geo.id == geo_item.main_geodata_id %}<i class="fa fa-check-circle text-success" aria-hidden="true"></i>{% else %}&ndash;{% endif %}</td>
<td>{% if geo.data_type %}{{ geo.data_type }}{% else %}-{% endif %}</td>
@@ -27,9 +29,11 @@
<td>{% if geo.provider %}{{ geo.provider }}{% else %}-{% endif %}</td>
<td>{% if geo.comment %}{{ geo.comment }}{% else %}-{% endif %}</td>
{% if not IS_HISTORY and permission_change_geo and output != "ODT" and output != "PDF" %}<td>
+ {% autoescape off %}
<a title="{% trans 'Delete' %}"
- href="{% url 'delete-geo' geo.pk %}{% if search_url %}?back_url={{search_url}}%3Fopen_item={{geo_item.pk|unlocalize}}{% endif %}">
+ 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 %}<i class="fa fa-trash text-danger"></i></a>{% else %}&ndash;{% endif %}
+ {% endautoescape %}
</td>{% endif %}
</tr>
{% endfor %}