diff options
author | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-08-26 19:21:31 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@peacefrogs.net> | 2013-08-26 19:21:31 +0200 |
commit | c07a65eab011f364f2cf24e49787b152385979c9 (patch) | |
tree | 051dad3c26c1372fcb13fcd1e9d8978d0c30254c | |
parent | c08f9930d6d0a8b7ffc539aefc3fcabee3e0d942 (diff) | |
download | Ishtar-c07a65eab011f364f2cf24e49787b152385979c9.tar.bz2 Ishtar-c07a65eab011f364f2cf24e49787b152385979c9.zip |
Improve context record search (refs #362)
-rw-r--r-- | archaeological_context_records/forms.py | 8 | ||||
-rw-r--r-- | archaeological_context_records/views.py | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py index ce9175d10..f90cf7e9d 100644 --- a/archaeological_context_records/forms.py +++ b/archaeological_context_records/forms.py @@ -42,8 +42,14 @@ from ishtar_common.forms_common import get_town_field, SourceForm, \ from archaeological_operations.forms import OperationSelect, ParcelField class RecordSelect(TableSelect): + label = forms.CharField(label=_(u"ID"), max_length=100) parcel__town = get_town_field() - operation__year = forms.IntegerField(label=_(u"Year")) + if settings.COUNTRY == 'fr': + operation__code_patriarche = forms.IntegerField( + label=_(u"Code PATRIARCHE")) + operation__year = forms.IntegerField(label=_(u"Operation's year")) + operation__operation_code = forms.IntegerField( + label=_(u"Operation's number (index by year)")) datings__period = forms.ChoiceField(label=_(u"Period"), choices=[]) unit = forms.ChoiceField(label=_(u"Unit type"), choices=[]) parcel = ParcelField(label=_("Parcel (section/number)")) diff --git a/archaeological_context_records/views.py b/archaeological_context_records/views.py index c59446bcf..36af392a1 100644 --- a/archaeological_context_records/views.py +++ b/archaeological_context_records/views.py @@ -30,6 +30,8 @@ get_contextrecord = get_item(models.ContextRecord, 'get_contextrecord', 'contextrecord', extra_request_keys={'parcel__town':'parcel__town__pk', 'operation__year':'operation__year__contains', + 'operation__code_patriarche':'operation__code_patriarche', + 'operation__operation_code':'operation__operation_code', 'datings__period':'datings__period__pk', 'parcel_0':'operation__parcels__section', 'parcel_1':'operation__parcels__parcel_number', |