diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-08-16 17:43:20 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2016-08-16 17:43:20 +0200 |
commit | 993416780e04c8de3e59121c6503cc7786c9bea2 (patch) | |
tree | a5bc8855e2fb99ea3b753298f2d6b83f512d897a /archaeological_context_records | |
parent | b1f5bad2ddaebe2dd9943333d7efd131f63896e9 (diff) | |
download | Ishtar-993416780e04c8de3e59121c6503cc7786c9bea2.tar.bz2 Ishtar-993416780e04c8de3e59121c6503cc7786c9bea2.zip |
Docs: search by operation code (refs #3015)
Diffstat (limited to 'archaeological_context_records')
-rw-r--r-- | archaeological_context_records/forms.py | 9 | ||||
-rw-r--r-- | archaeological_context_records/views.py | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py index ff1ddc6fa..9cec6a0e5 100644 --- a/archaeological_context_records/forms.py +++ b/archaeological_context_records/forms.py @@ -280,10 +280,15 @@ SourceRecordFormSelection = get_form_selection( class RecordSourceSelect(SourceSelect): - context_record__parcel__town = get_town_field( - label=_(u"Town of the operation")) context_record__operation__year = forms.IntegerField( label=_(u"Year of the operation")) + context_record__operation__operation_code = forms.IntegerField( + label=_(u"Numeric reference")) + if settings.COUNTRY == 'fr': + context_record__operation__code_patriarche = forms.IntegerField( + label="Numéro d'opération (OA Patriarche)") + context_record__parcel__town = get_town_field( + label=_(u"Town of the operation")) context_record__datings__period = forms.ChoiceField( label=_(u"Period of the context record"), choices=[]) context_record__unit = forms.ChoiceField( diff --git a/archaeological_context_records/views.py b/archaeological_context_records/views.py index c76413977..e97abe83c 100644 --- a/archaeological_context_records/views.py +++ b/archaeological_context_records/views.py @@ -100,6 +100,10 @@ get_contextrecordsource = get_item( 'additional_information': 'additional_information__icontains', 'context_record__parcel__town': 'context_record__parcel__town__pk', 'context_record__operation__year': 'context_record__operation__year', + 'context_record__operation__operation_code': + 'context_record__operation__operation_code', + 'context_record__operation__code_patriarche': + 'context_record__operation__code_patriarche', 'context_record__operation': 'context_record__operation__pk', 'context_record__datings__period': 'context_record__datings__period__pk', |