summaryrefslogtreecommitdiff
path: root/archaeological_context_records
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2022-11-02 16:03:26 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-12-12 12:23:19 +0100
commite131856e48cc4644443c62f3f826fa451cb7e66b (patch)
tree5888b277c026e0c6e9209472f016055ba73d77c4 /archaeological_context_records
parentad0c40ca519ec3d81120744e6c511fb3d5992897 (diff)
downloadIshtar-e131856e48cc4644443c62f3f826fa451cb7e66b.tar.bz2
Ishtar-e131856e48cc4644443c62f3f826fa451cb7e66b.zip
Geodata - search: add search fields on related items searches
Diffstat (limited to 'archaeological_context_records')
-rw-r--r--archaeological_context_records/forms.py6
-rw-r--r--archaeological_context_records/models.py1
2 files changed, 4 insertions, 3 deletions
diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py
index 8d05e50e1..27900ef80 100644
--- a/archaeological_context_records/forms.py
+++ b/archaeological_context_records/forms.py
@@ -52,7 +52,7 @@ from ishtar_common.forms import (
HistorySelect,
MultiSearchForm,
LockForm,
- DocumentItemSelect,
+ GeoItemSelect,
QAForm,
)
from ishtar_common.forms_common import get_town_field
@@ -133,7 +133,7 @@ class PeriodSelect(forms.Form):
self.fields = fields
-class RecordSelect(DocumentItemSelect, PeriodSelect):
+class RecordSelect(GeoItemSelect, PeriodSelect):
_model = models.ContextRecord
form_admin_name = _("Context record - 001 - Search")
form_slug = "contextrecord-001-search"
@@ -177,7 +177,7 @@ class RecordSelect(DocumentItemSelect, PeriodSelect):
FieldType("cr_relation_types", models.RelationType),
FieldType("ope_relation_types", OpeRelationType),
FieldType("excavation_technics", models.ExcavationTechnicType),
- ]
+ ] + GeoItemSelect.TYPES
SITE_KEYS = {"archaeological_site": None}
def __init__(self, *args, **kwargs):
diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py
index 09733b566..da6b3b86a 100644
--- a/archaeological_context_records/models.py
+++ b/archaeological_context_records/models.py
@@ -631,6 +631,7 @@ class ContextRecord(
ALT_NAMES.update(BaseHistorizedItem.ALT_NAMES)
ALT_NAMES.update(DocumentItem.ALT_NAMES)
ALT_NAMES.update(Dating.ASSOCIATED_ALT_NAMES)
+ ALT_NAMES.update(GeoItem.ALT_NAMES)
PARENT_ONLY_SEARCH_VECTORS = ["operation", "archaeological_site", "parcel"]
BASE_SEARCH_VECTORS = [