diff options
author | Cefin <kevon@tuta.io> | 2021-11-22 10:30:17 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2022-07-08 09:58:49 +0200 |
commit | 262792d9c1e44c80fdf6f761b5b925656e2767e6 (patch) | |
tree | 5274633275f8ae8e0208c431cb3d79250ce5193f | |
parent | 40248b8256fab26f30bc486d72a74db0f0bd632b (diff) | |
download | Ishtar-262792d9c1e44c80fdf6f761b5b925656e2767e6.tar.bz2 Ishtar-262792d9c1e44c80fdf6f761b5b925656e2767e6.zip |
add operation common name on UE search #5219
-rw-r--r-- | archaeological_context_records/forms.py | 1 | ||||
-rw-r--r-- | archaeological_context_records/models.py | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py index 73666cab5..f4c20d55a 100644 --- a/archaeological_context_records/forms.py +++ b/archaeological_context_records/forms.py @@ -148,6 +148,7 @@ class RecordSelect(DocumentItemSelect, PeriodSelect): operation__code_patriarche = forms.CharField( max_length=500, widget=OAWidget, label=_("Code PATRIARCHE") ) + operation__common_name = forms.CharField(label=_("Operation name"), max_length=30) operation__year = forms.IntegerField(label=_("Operation's year")) operation__operation_code = forms.IntegerField( label=_("Operation's number (index by year)") diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index 41a76b171..257e378ce 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -504,6 +504,9 @@ class ContextRecord( "operation__year": SearchAltName( pgettext_lazy("key for text search", "operation-year"), "operation__year" ), + "operation__common_name": SearchAltName( + pgettext_lazy("key fro text search", "operation-name"), "operation__common_name__icontains" + ), "operation__code_patriarche": SearchAltName( pgettext_lazy("key for text search", "patriarche"), "operation__code_patriarche__iexact", |