summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelog/en/changelog_2022-06-15.md1
-rw-r--r--changelog/fr/changelog_2023-01-25.md1
-rw-r--r--ishtar_common/forms.py4
-rw-r--r--ishtar_common/models_common.py8
4 files changed, 14 insertions, 0 deletions
diff --git a/changelog/en/changelog_2022-06-15.md b/changelog/en/changelog_2022-06-15.md
index c44e5d13f..244eeab6f 100644
--- a/changelog/en/changelog_2022-06-15.md
+++ b/changelog/en/changelog_2022-06-15.md
@@ -2,6 +2,7 @@ v4.0.48 - 2023-
--------------------
### Features/improvements ###
+- Search criteria - geo - "Z lower than", "Z higher than"
- Sheet: display coordinates of points
### Technical ###
diff --git a/changelog/fr/changelog_2023-01-25.md b/changelog/fr/changelog_2023-01-25.md
index 239de790b..e5279e616 100644
--- a/changelog/fr/changelog_2023-01-25.md
+++ b/changelog/fr/changelog_2023-01-25.md
@@ -2,6 +2,7 @@ v4.0.48 - 2023-
--------------------
### Fonctionnalités/améliorations ###
+- Critères de recherche - Géo - « Z plus petit », « Z plus grand »
- Fiche : affichage des coordonnées des points
### Technique ###
diff --git a/ishtar_common/forms.py b/ishtar_common/forms.py
index ad2548aa1..5a2e14b02 100644
--- a/ishtar_common/forms.py
+++ b/ishtar_common/forms.py
@@ -1312,12 +1312,16 @@ class GeoItemSelect(DocumentItemSelect): # all geo item can have documents
geodata__data_type = forms.ChoiceField(label=_("Geo - Data type"), choices=[])
geodata__origin = forms.ChoiceField(label=_("Geo - Origin"), choices=[])
geodata__provider = forms.ChoiceField(label=_("Geo - Provider"), choices=[])
+ geodata__z__gt = forms.FloatField(label=_("Geo - Z - higher than"))
+ geodata__z__lt = forms.FloatField(label=_("Geo - Z - lower than"))
geodata__comment = forms.CharField(label=_("Geo - Comment"), max_length=500)
CURRENT_FIELDS = [
"geodata__name",
"geodata__data_type",
"geodata__origin",
"geodata__provider",
+ "geodata__z__gt",
+ "geodata__z__lt",
"geodata__comment",
] + DocumentItemSelect.CURRENT_FIELDS
_explicit_ordering = True
diff --git a/ishtar_common/models_common.py b/ishtar_common/models_common.py
index a6f5d1197..78a7cc037 100644
--- a/ishtar_common/models_common.py
+++ b/ishtar_common/models_common.py
@@ -3039,6 +3039,14 @@ class GeographicItem(models.Model):
"geodata__provider": SearchAltName(
pgettext_lazy("key for text search", "geo-provider"), "geodata__provider__label__iexact"
),
+ "geodata__z__gt": SearchAltName(
+ pgettext_lazy("key for text search", "z-higher"),
+ "geodata__cached_z__gte"
+ ),
+ "geodata__z__lt": SearchAltName(
+ pgettext_lazy("key for text search", "z-lower"),
+ "geodata__cached_z__lte"
+ ),
"geodata__comment": SearchAltName(
pgettext_lazy("key for text search", "geo-comment"), "geodata__comment__iexact"
),