diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-09-20 14:19:50 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2024-09-20 15:47:14 +0200 |
commit | 038d2ddee75aaccf0ad0c60d66efe09de69958e8 (patch) | |
tree | 7060495eadaed324a0ab475f7e3e872f7ff30e1c | |
parent | b9f9eb50906183baa1d1cd1ad3440cb377500394 (diff) | |
download | Ishtar-038d2ddee75aaccf0ad0c60d66efe09de69958e8.tar.bz2 Ishtar-038d2ddee75aaccf0ad0c60d66efe09de69958e8.zip |
✨ context_record, find sheet: add new fields
-rw-r--r-- | archaeological_context_records/templates/ishtar/sheet_contextrecord.html | 11 | ||||
-rw-r--r-- | archaeological_finds/forms.py | 15 | ||||
-rw-r--r-- | archaeological_finds/templates/ishtar/sheet_basefind.html | 1 |
3 files changed, 17 insertions, 10 deletions
diff --git a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html index 984be20bd..17f063fa3 100644 --- a/archaeological_context_records/templates/ishtar/sheet_contextrecord.html +++ b/archaeological_context_records/templates/ishtar/sheet_contextrecord.html @@ -133,6 +133,7 @@ <div class='row'> {% field_flex_2 "Complete ID" item.full_label %} {% field_flex_2 "Type" item.unit %} + {% field_flex_detail _("Excavator") item.excavator %} {% field_flex_full "General comment" item.comment "<pre>" "</pre>" has_image %} </div> </div> @@ -143,14 +144,13 @@ {% field_flex_multiple_obj "Documentation" item 'documentations' %} {% field_flex "Opening date" item.opening_date|date:"DATE_FORMAT" %} {% field_flex "Closing date" item.closing_date|date:"DATE_FORMAT" %} - {% field_flex_full "Filling" item.filling "<pre>" "</pre>" %} - {% field_flex_full "Location" item.location "<pre>" "</pre>" %} - {% field_flex_full "Description" item.description "<pre>" "</pre>" %} {% field_flex_multiple_obj _("Structure") item 'structures' %} {% field_flex_multiple_obj _("Texture") item 'textures' %} {% field_flex_multiple_obj _("Inclusion") item 'inclusions' %} {% field_flex_multiple_obj _("Colors") item 'colors' %} - {% field_flex_full _("Details on color") item.details_on_color "<pre>" "</pre>" %} + {% field_flex _("Details on color") item.details_on_color %} + {% field_flex_full "Filling" item.filling "<pre>" "</pre>" %} + {% field_flex_full "Description" item.description "<pre>" "</pre>" %} </div> <h3>{% trans "Dimensions" %}</h3> <div class="row"> @@ -172,7 +172,7 @@ {% field_flex "Depth of appearance (m)" item.depth_of_appearance %} </div> - {% if item.main_geodata %} + {% if item.main_geodata or item.town or item.location %} <h3>{% trans "Geographic localisation" %}</h3> <div class='row'> {% with geo_item=item %} @@ -181,6 +181,7 @@ </div> <div class='row'> {% field_flex_detail_full "Town" item.town has_image %} + {% field_flex_full "Location" item.location "<pre>" "</pre>" %} </div> {% endif %} diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py index 4fa06e7bf..b04276155 100644 --- a/archaeological_finds/forms.py +++ b/archaeological_finds/forms.py @@ -242,7 +242,7 @@ class BasicFindForm(CustomForm, ManageOldType): "museum_original_repro": models.OriginalReproduction, "museum_donor": BiographicalNote, "museum_former_collection": BiographicalNote, - "discovery_method": models.DiscoveryMethod, + "get_first_base_find__discovery_method": models.DiscoveryMethod, #'collection': Warehouse, } field_order = [ @@ -279,7 +279,7 @@ class BasicFindForm(CustomForm, ManageOldType): "museum_purchase_price", "description", "public_description", - "discovery_method", + "get_first_base_find__discovery_method", "is_complete", "material_type", "material_type_quality", @@ -435,8 +435,10 @@ class BasicFindForm(CustomForm, ManageOldType): public_description = forms.CharField( label=_("Public description"), widget=forms.Textarea, required=False ) + get_first_base_find__discovery_method = forms.ChoiceField( + label=_("Discovery method"), required=False, choices=[] + ) is_complete = forms.NullBooleanField(label=_("Is complete?"), required=False) - discovery_method = forms.ChoiceField(label=_("Discovery method"), required=False, choices=[]) material_type = widgets.Select2MultipleField( label=_("Material types"), required=False ) @@ -559,7 +561,7 @@ class BasicFindForm(CustomForm, ManageOldType): is_multiple=True, extra_args={"full_hierarchy": True}, ), - FieldType("discovery_method", models.DiscoveryMethod), + FieldType("get_first_base_find__discovery_method", models.DiscoveryMethod), FieldType("object_type_quality", models.ObjectTypeQualityType), FieldType("functional_area", models.FunctionalArea, is_multiple=True), FieldType("technical_area", models.TechnicalAreaType, is_multiple=True), @@ -653,7 +655,7 @@ class FindForm(BasicFindForm): "museum_inventory_transcript", "description", "public_description", - "discovery_method", + "get_first_base_find__discovery_method", "get_first_base_find__comment", "get_first_base_find__discovery_date", "get_first_base_find__discovery_date_taq", @@ -702,6 +704,9 @@ class FindForm(BasicFindForm): label=_("Excavation ID"), required=False ) + get_first_base_find__discovery_method = forms.ChoiceField( + label=_("Discovery method"), required=False, choices=[] + ) get_first_base_find__discovery_date = DateField( label=_("Discovery date (exact or beginning)"), required=False ) diff --git a/archaeological_finds/templates/ishtar/sheet_basefind.html b/archaeological_finds/templates/ishtar/sheet_basefind.html index 82c2cbd53..996e8a8a6 100644 --- a/archaeological_finds/templates/ishtar/sheet_basefind.html +++ b/archaeological_finds/templates/ishtar/sheet_basefind.html @@ -20,6 +20,7 @@ {% field_flex_detail "Town" base_find.context_record.town first %} {% field_flex "Parcel" base_find.context_record.parcel '' '' first %} + {% field_flex _("Discovery method") base_find.discovery_method '' '' first %} {# START discovery dates #} {% with base_find.discovery_date|date:"SHORT_DATE_FORMAT" as discovery_date %} {% if not base_find.discovery_date_taq %} |