diff options
Diffstat (limited to 'archaeological_operations')
-rw-r--r-- | archaeological_operations/forms.py | 20 | ||||
-rw-r--r-- | archaeological_operations/models.py | 31 |
2 files changed, 49 insertions, 2 deletions
diff --git a/archaeological_operations/forms.py b/archaeological_operations/forms.py index 1dbafbd14..18e588d5a 100644 --- a/archaeological_operations/forms.py +++ b/archaeological_operations/forms.py @@ -1200,14 +1200,23 @@ class SiteSelect(GeoItemSelect): name = forms.CharField(label=_("Name"), max_length=200, required=False) other_reference = forms.CharField(label=_("Other reference"), max_length=200, required=False) + types = forms.ChoiceField(label=_("Types"), choices=[], required=False) + discoverer = forms.IntegerField( + widget=widgets.JQueryAutoComplete(reverse_lazy('autocomplete-person'), associated_model=Person), + label=_("Discoverer")) periods = forms.ChoiceField(label=_("Periods"), choices=[], required=False) remains = forms.ChoiceField(label=_("Remains"), choices=[], required=False) cultural_attributions = forms.ChoiceField( label=_("Cultural attribution"), choices=[], required=False) + discovery_status = forms.ChoiceField(label=_("Discovery status"), choices=[], required=False) + current_status = forms.ChoiceField(label=_("Current status"), choices=[], required=False) + nature_of_site = forms.ChoiceField(label=_("Nature of site"), choices=[], required=False) + interpretation_level = forms.ChoiceField(label=_("Interpretation level"), choices=[], required=False) towns = get_town_field() towns__areas = forms.ChoiceField(label=_("Areas"), choices=[]) - comment = forms.CharField(label=_("Comment"), max_length=200, - required=False) + description = forms.CharField(label=_("Description"), max_length=200, required=False) + public_description = forms.CharField(label=_("Public description"), max_length=200, required=False) + comment = forms.CharField(label=_("Comment"), max_length=200, required=False) top_operation = forms.IntegerField( label=_("Top operation"), required=False, widget=widgets.JQueryAutoComplete( @@ -1220,6 +1229,8 @@ class SiteSelect(GeoItemSelect): reverse_lazy('autocomplete-operation'), associated_model=models.Operation), validators=[valid_id(models.Operation)]) + precise_locality = forms.CharField(label=_("Precise locality"), max_length=200, + required=False) locality_ngi = forms.CharField( label=_("National Geographic Institute locality"), max_length=200, required=False) @@ -1247,7 +1258,12 @@ class SiteSelect(GeoItemSelect): TYPES = [ FieldType('periods', models.Period), FieldType('remains', models.RemainType), + FieldType('types', models.SiteType), + FieldType('current_status', models.SiteCurrentStatusType), + FieldType('discovery_status', models.SiteDiscoveryStatusType), FieldType('cultural_attributions', models.CulturalAttributionType), + FieldType('nature_of_site', models.NatureOfSiteType), + FieldType('interpretation_level', models.InterpretationLevelType), FieldType('towns__areas', Area), ] + GeoItemSelect.TYPES diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py index 5ccaf9b23..2f3cae888 100644 --- a/archaeological_operations/models.py +++ b/archaeological_operations/models.py @@ -441,6 +441,25 @@ class ArchaeologicalSite( pgettext_lazy("key for text search", "other-reference"), "other_reference__iexact", ), + "types": SearchAltName( + pgettext_lazy("key for text search", "type"), "types__label__iexact" + ), + "discovery_status": SearchAltName( + pgettext_lazy("key for text search", "discovery-status"), + "discovery_status__label__iexact" + ), + "current_status": SearchAltName( + pgettext_lazy("key for text search", "current-status"), + "current_status__label__iexact" + ), + "nature_of_site": SearchAltName( + pgettext_lazy("key for text search", "nature"), + "nature_of_site__label__iexact" + ), + "interpretation_level": SearchAltName( + pgettext_lazy("key for text search", "interpretation-level"), + "interpretation_level__label__iexact" + ), "periods": SearchAltName( pgettext_lazy("key for text search", "period"), "periods__label__iexact" ), @@ -453,9 +472,21 @@ class ArchaeologicalSite( "towns__areas": SearchAltName( pgettext_lazy("key for text search", "area"), "towns__areas__label__iexact" ), + "description": SearchAltName( + pgettext_lazy("key for text search", "description"), "description__iexact" + ), + "discoverer": SearchAltName( + pgettext_lazy("key for text search", "discoverer"), "discoverer__cached_label__iexact", + ), + "public_description": SearchAltName( + pgettext_lazy("key for text search", "public-description"), "public_description__iexact" + ), "comment": SearchAltName( pgettext_lazy("key for text search", "comment"), "comment__iexact" ), + "precise_locality": SearchAltName( + pgettext_lazy("key for text search", "locality"), "precise_locality__iexact" + ), "locality_ngi": SearchAltName( pgettext_lazy("key for text search", "locality-ngi"), "locality_ngi__iexact" ), |