summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--archaeological_context_records/forms.py9
-rw-r--r--archaeological_context_records/views.py4
-rw-r--r--archaeological_finds/forms.py5
-rw-r--r--archaeological_finds/views.py8
-rw-r--r--archaeological_operations/forms.py7
-rw-r--r--archaeological_operations/views.py1
6 files changed, 29 insertions, 5 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',
diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py
index 03a9c5762..7b9c68d75 100644
--- a/archaeological_finds/forms.py
+++ b/archaeological_finds/forms.py
@@ -431,6 +431,11 @@ SourceFindFormSelection = get_form_selection(
class FindSourceSelect(SourceSelect):
find__base_finds__context_record__operation__year = forms.IntegerField(
label=_(u"Year of the operation"))
+ find__base_finds__context_record__operation__operation_code = \
+ forms.IntegerField(label=_(u"Numeric reference"))
+ if settings.COUNTRY == 'fr':
+ find__base_finds__context_record__operation__code_patriarche = \
+ forms.IntegerField(label="Numéro d'opération (OA Patriarche)")
find__datings__period = forms.ChoiceField(
label=_(u"Period of the archaelogical find"), choices=[])
find__material_type = forms.ChoiceField(
diff --git a/archaeological_finds/views.py b/archaeological_finds/views.py
index 8bae9785c..dc8b191ad 100644
--- a/archaeological_finds/views.py
+++ b/archaeological_finds/views.py
@@ -89,8 +89,12 @@ get_findsource = get_item(
'description': 'description__icontains',
'comment': 'comment__icontains',
'additional_information': 'additional_information__icontains',
- 'find__context_record__operation__year':
- 'find__context_record__operation__year',
+ 'find__base_finds__context_record__operation__year':
+ 'find__base_finds__context_record__operation__year',
+ 'find__base_finds__context_record__operation__operation_code':
+ 'find__base_finds__context_record__operation__operation_code',
+ 'find__base_finds__context_record__operation__code_patriarche':
+ 'find__base_finds__context_record__operation__code_patriarche',
'find__datings__period': 'find__datings__period__pk',
'find__description': 'find__description__icontains',
})
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'})