summaryrefslogtreecommitdiff
path: root/archaeological_finds
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2024-02-16 15:58:53 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2024-04-16 16:41:51 +0200
commitf6c6695b19f6d75dc5fa6da0d1389f90f24835bc (patch)
tree993de482bd8e9be26a8ac295e06b501f8a2b39dc /archaeological_finds
parentf05d73437dd9b7703cd225f5bf84446a3c443900 (diff)
downloadIshtar-f6c6695b19f6d75dc5fa6da0d1389f90f24835bc.tar.bz2
Ishtar-f6c6695b19f6d75dc5fa6da0d1389f90f24835bc.zip
✨ Biographical note sheet
Diffstat (limited to 'archaeological_finds')
-rw-r--r--archaeological_finds/forms.py2
-rw-r--r--archaeological_finds/models_finds.py6
-rw-r--r--archaeological_finds/templates/ishtar/sheet_museum_find.html13
3 files changed, 13 insertions, 8 deletions
diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py
index e30a7bc8d..21edb2eba 100644
--- a/archaeological_finds/forms.py
+++ b/archaeological_finds/forms.py
@@ -352,13 +352,13 @@ class BasicFindForm(CustomForm, ManageOldType):
previous_id = forms.CharField(label=_("Previous ID"), required=False)
laboratory_id = forms.CharField(label=_("Laboratory ID"), required=False)
seal_number = forms.CharField(label=_("Seal number"), required=False)
- mark = forms.CharField(label=_("Mark"), required=False)
museum_inventory_marking_presence = widgets.Select2MultipleField(
label=_("Presence of inventory marking"), required=False
)
museum_marking_type = widgets.Select2MultipleField(
label=_("Type of marking"), required=False
)
+ mark = forms.CharField(label=_("Marking details"), required=False)
museum_marking_comment = forms.CharField(
label=_("Comment on marking"), widget=forms.Textarea, required=False
)
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py
index 030328d1d..68b845f59 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -2219,6 +2219,12 @@ class Find(
from django.utils.formats import date_format
if not self.museum_entry_date:
return
+ if self.museum_entry_date and self.museum_entry_date_end and (
+ self.museum_entry_date.year == self.museum_entry_date_end.year and
+ self.museum_entry_date.month == 1 and self.museum_entry_date_end.month == 12 and
+ self.museum_entry_date.day == 1 and self.museum_entry_date_end.day == 31
+ ):
+ return self.museum_entry_date.year
dates = [date_format(self.museum_entry_date, format='SHORT_DATE_FORMAT', use_l10n=True)]
if self.museum_entry_date_end:
dates.append(date_format(self.museum_entry_date_end, format='SHORT_DATE_FORMAT', use_l10n=True))
diff --git a/archaeological_finds/templates/ishtar/sheet_museum_find.html b/archaeological_finds/templates/ishtar/sheet_museum_find.html
index e1c82d791..a3b60f7cd 100644
--- a/archaeological_finds/templates/ishtar/sheet_museum_find.html
+++ b/archaeological_finds/templates/ishtar/sheet_museum_find.html
@@ -145,10 +145,10 @@
{% if item.has_museum_section %}
<h3>{% trans "Museum / legal status" %}</h3>
<div class='row'>
- {% field_flex "Museum ID prefix" item.museum_id_prefix %}
- {% field_flex "Museum inventory number" item.museum_id %}
- {% field_flex "Museum ID suffix" item.museum_id_suffix %}
+ {% field_flex "Complete museum ID" item.cache_complete_museum_id %}
{% field_flex "Comment on museum ID" item.museum_id_comment %}
+ {% field_flex "Collection" item.museum_collection %}
+ {% field_flex_detail_multiple "Former collection" item.museum_former_collections %}
{% field_flex_detail "Owner institution" item.museum_owner_institution %}
{% field_flex_detail "Custodian institution" item.museum_custodian_institution %}
{% field_flex "Depositor inventory number" item.museum_depositor_inventory_number %}
@@ -157,15 +157,14 @@
{% trans "Museum entry date" as museum_entry_date_label %}
{% field_flex museum_entry_date_label item.museum_entry_date_label %}
{% field_flex "Comment on museum entry date" item.museum_entry_date_comment %}
- {% field_flex "Name of donor, testator or vendor" item.museum_donor %}
+ {% field_flex_detail "Donor, testator or vendor" item.museum_donor %}
{% field_flex_multiple_obj "Presence of inventory marking" item "museum_inventory_marking_presence" %}
{% field_flex_multiple_obj "Type of marking" item "museum_marking_type" %}
+ {% field_flex "Marking details" item.mark "<pre>" "</pre>" %}
{% field_flex "Comment on marking" item.museum_marking_comment %}
- {% field_flex "Collection" item.museum_collection %}
- {% field_flex_multiple_obj "Former collection" item "museum_former_collections" %}
- {% field_flex "Inventory entry year" item.museum_inventory_entry_year %}
{% field_flex "Conformity with inventory" item.museum_inventory_conformity %}
{% field_flex "Comment of non-conformity" item.museum_non_conformity_comment %}
+ {% field_flex "Inventory entry year" item.museum_inventory_entry_year %}
{% field_flex "Inventory transcript" item.museum_inventory_transcript %}
{% field_flex "Original/reproduction" item.museum_original_repro %}
{% field_flex "Date of museum allocation" item.museum_allocation_date|date:"SHORT_DATE_FORMAT" %}