diff options
| -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", | 
