diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-03-08 14:06:52 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2023-03-08 14:06:52 +0100 |
commit | 9cb715d77b1f864399023f16c56a6dc088ef5ef1 (patch) | |
tree | 1541eb69ea0e75ac362242b50778c98ee8dd91c2 | |
parent | 4135c16fc28925ba8a42006d1e2849829b7e4ddd (diff) | |
download | Ishtar-9cb715d77b1f864399023f16c56a6dc088ef5ef1.tar.bz2 Ishtar-9cb715d77b1f864399023f16c56a6dc088ef5ef1.zip |
Context record search: add identification and activity criteria (refs #3657)
-rw-r--r-- | CHANGES.md | 1 | ||||
-rw-r--r-- | archaeological_context_records/forms.py | 4 | ||||
-rw-r--r-- | archaeological_context_records/models.py | 7 |
3 files changed, 12 insertions, 0 deletions
diff --git a/CHANGES.md b/CHANGES.md index 9f1f717c6..8928e53ed 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -37,6 +37,7 @@ Ishtar changelog - fix many excluded facet - improve many facet query - Document - source type is now a hierarchic search + - Context record: add identification and activity criteria - Find form: remove TAQ/TPQ check - File: filter plan action when preventive_operator is activated in profile - Profile: do not display geo item list when mapping is deactivated diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py index 760f154f0..e22bb73cc 100644 --- a/archaeological_context_records/forms.py +++ b/archaeological_context_records/forms.py @@ -165,6 +165,8 @@ class RecordSelect(GeoItemSelect, PeriodSelect): label=_("Search within related operations"), choices=[] ) unit = forms.ChoiceField(label=_("Unit type"), choices=[]) + activity = forms.ChoiceField(label=_("Activity"), choices=[]) + identification = forms.ChoiceField(label=_("Identification"), choices=[]) parcel = forms.CharField(label=_("Parcel")) has_finds = forms.NullBooleanField(label=_("Has finds")) cr_relation_types = forms.ChoiceField( @@ -177,6 +179,8 @@ class RecordSelect(GeoItemSelect, PeriodSelect): FieldType("cr_relation_types", models.RelationType), FieldType("ope_relation_types", OpeRelationType), FieldType("excavation_technics", models.ExcavationTechnicType), + FieldType("activity", models.ActivityType), + FieldType("identification", models.IdentificationType), ] + GeoItemSelect.TYPES SITE_KEYS = {"archaeological_site": None} diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 3ff8f9d3f..8fd0a5ade 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -612,6 +612,13 @@ class ContextRecord( "unit": SearchAltName( pgettext_lazy("key for text search", "unit-type"), "unit__label__iexact" ), + "activity": SearchAltName( + pgettext_lazy("key for text search", "activity"), "activity__label__iexact" + ), + "identification": SearchAltName( + pgettext_lazy("key for text search", "identification"), + "identification__label__iexact" + ), "parcel": SearchAltName( pgettext_lazy("key for text search", "parcel"), "parcel__cached_label__iexact", |