diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-09-11 12:24:21 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-09-11 12:34:19 +0200 |
commit | 8b8cd541389412c4960f068848db7e45b71459b9 (patch) | |
tree | cb0f5c8d5ef419afc1d22f93cd8461a57f8cc653 /archaeological_context_records/forms.py | |
parent | 3ca42ee5280f3e1ee3f74ed6d61a4181188d0450 (diff) | |
download | Ishtar-8b8cd541389412c4960f068848db7e45b71459b9.tar.bz2 Ishtar-8b8cd541389412c4960f068848db7e45b71459b9.zip |
✨ criteria searches: add missing criteria for operation, find and context records (refs #6020) - Context records bulk update: add fields
Criteria searches:
- Finds: context record type
- Operations: has an attached archeo file
- Context records :
- Type of documentation
- Description
- Filling
- General comment
Context records bulk update:
- documentation
- identification
- excavation technic
Diffstat (limited to 'archaeological_context_records/forms.py')
-rw-r--r-- | archaeological_context_records/forms.py | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/archaeological_context_records/forms.py b/archaeological_context_records/forms.py index 3a04567ba..55f27ddcd 100644 --- a/archaeological_context_records/forms.py +++ b/archaeological_context_records/forms.py @@ -154,11 +154,16 @@ class RecordSelect(GeoItemSelect, PeriodSelect): ope_relation_types = forms.ChoiceField( label=_("Search within related operations"), choices=[] ) - unit = forms.ChoiceField(label=_("Unit type"), choices=[]) + unit = forms.ChoiceField(label=_("Type"), choices=[]) activity = forms.ChoiceField(label=_("Activity"), choices=[]) identifications = forms.ChoiceField(label=_("Identification"), choices=[]) cultural_attributions = forms.ChoiceField( label=_("Cultural attribution"), choices=[], required=False) + documentations = forms.ChoiceField(label=_("Documentation")) + description = forms.CharField(label=_("Description")) + comment = forms.CharField(label=_("General comment")) + filling = forms.CharField(label=_("Filling")) + interpretation = forms.CharField(label=_("Interpretation")) parcel = forms.CharField(label=_("Parcel")) has_finds = forms.NullBooleanField(label=_("Has finds")) cr_relation_types = forms.ChoiceField( @@ -174,6 +179,7 @@ class RecordSelect(GeoItemSelect, PeriodSelect): FieldType("excavation_technics", models.ExcavationTechnicType), FieldType("activity", models.ActivityType), FieldType("identifications", models.IdentificationType), + FieldType("documentations", models.DocumentationType), ] + GeoItemSelect.TYPES SITE_KEYS = {"archaeological_site": None} @@ -685,11 +691,16 @@ class QAContextRecordFormMulti(QAForm): "qa_relation_type": models.RelationType, "qa_related_to": models.ContextRecord, "qa_unit": models.Unit, + "qa_documentations": models.DocumentationType, + "qa_activity": models.ActivityType, + "qa_identifications": models.IdentificationType, + "qa_excavation_technics": models.ExcavationTechnicType, "qa_town": models.Town, "qa_parcel": models.Parcel, } REPLACE_FIELDS = [ "qa_unit", + "qa_activity", "qa_town", "qa_archaeological_site", "qa_parcel", @@ -717,6 +728,10 @@ class QAContextRecordFormMulti(QAForm): ), required=False, ) + qa_documentations = forms.ChoiceField(label=_("Documentation"), required=False) + qa_excavation_technics = forms.ChoiceField(label=_("Excavation technic"), required=False) + qa_activity = forms.ChoiceField(label=_("Activity"), required=False) + qa_identifications = forms.ChoiceField(label=_("Identification"), required=False) qa_archaeological_site = forms.IntegerField( label=_("Archaeological site"), widget=widgets.JQueryAutoComplete( @@ -732,10 +747,14 @@ class QAContextRecordFormMulti(QAForm): TYPES = [ FieldType("qa_relation_type", models.RelationType), FieldType("qa_unit", models.Unit), + FieldType("qa_documentations", models.DocumentationType), + FieldType("qa_excavation_technics", models.ExcavationTechnicType), + FieldType("qa_activity", models.ActivityType), + FieldType("qa_identifications", models.IdentificationType), ] def __init__(self, *args, **kwargs): - super(QAContextRecordFormMulti, self).__init__(*args, **kwargs) + super().__init__(*args, **kwargs) self.items = kwargs.pop("items") disable = False |