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_operations | |
parent | b1f5bad2ddaebe2dd9943333d7efd131f63896e9 (diff) | |
download | Ishtar-993416780e04c8de3e59121c6503cc7786c9bea2.tar.bz2 Ishtar-993416780e04c8de3e59121c6503cc7786c9bea2.zip |
Docs: search by operation code (refs #3015)
Diffstat (limited to 'archaeological_operations')
-rw-r--r-- | archaeological_operations/forms.py | 7 | ||||
-rw-r--r-- | archaeological_operations/views.py | 1 |
2 files changed, 7 insertions, 1 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index b61285177..f71129615 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -1120,10 +1120,15 @@ SourceOperationFormSelection = get_form_selection( class OperationSourceSelect(SourceSelect): + operation__year = forms.IntegerField(label=_(u"Operation's year")) + operation__operation_code = forms.IntegerField( + label=_(u"Numeric reference")) + if settings.COUNTRY == 'fr': + operation__code_patriarche = forms.IntegerField( + label="Numéro d'opération (OA Patriarche)") operation__towns = get_town_field(label=_(u"Operation's town")) operation__operation_type = forms.ChoiceField(label=_(u"Operation type"), choices=[]) - operation__year = forms.IntegerField(label=_(u"Operation's year")) def __init__(self, *args, **kwargs): super(OperationSourceSelect, self).__init__(*args, **kwargs) diff --git a/archaeological_operations/views.py b/archaeological_operations/views.py index baed806b3..a146b92f4 100644 --- a/archaeological_operations/views.py +++ b/archaeological_operations/views.py @@ -180,6 +180,7 @@ get_operationsource = get_item( 'comment': 'comment__icontains', 'additional_information': 'additional_information__icontains', 'operation__towns': 'operation__towns__pk', + 'operation__operation_code': 'operation__operation_code', 'operation__code_patriarche': 'operation__code_patriarche', 'operation__operation_type': 'operation__operation_type__pk', 'operation__year': 'operation__year'}) |