summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2026-04-17 12:44:25 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2026-04-20 16:17:24 +0200
commit766b3079b8b39a255af1b00309a4e7e41635764d (patch)
tree4db9c5f19f0aca04cb258d9575ad26d2c52f323b
parent167b735b378c0e4fe6dc52f951b97994ba21d945 (diff)
downloadIshtar-766b3079b8b39a255af1b00309a4e7e41635764d.tar.bz2
Ishtar-766b3079b8b39a255af1b00309a4e7e41635764d.zip
✨ finds - sheet: many new fields
-rw-r--r--archaeological_finds/forms.py2
-rw-r--r--archaeological_finds/models_finds.py12
-rw-r--r--archaeological_finds/templates/ishtar/sheet_find.html17
-rw-r--r--archaeological_finds/templates/ishtar/sheet_find_treatments.html1
-rw-r--r--archaeological_finds/templates/ishtar/sheet_museum_find.html17
5 files changed, 44 insertions, 5 deletions
diff --git a/archaeological_finds/forms.py b/archaeological_finds/forms.py
index 2832076e2..447d1064c 100644
--- a/archaeological_finds/forms.py
+++ b/archaeological_finds/forms.py
@@ -550,7 +550,7 @@ class BasicFindForm(MuseumForm, CustomForm, ManageOldType):
)
actor = widgets.Select2MultipleField(
model=QualifiedBiographicalNote, label=_("Actors"), required=False,
- remote=True, new=True, remote_filter='qualification_type__F')
+ remote=True, new=True, remote_filter='qualification_type__F-A')
HEADERS["length"] = FormHeader(_("Dimensions"))
length = FloatField(
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py
index 1bd3d6b6a..fcc82dd60 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -2622,15 +2622,23 @@ class Find(
)
@property
+ def has_listed_building_section(self):
+ return self.listed_building_protection_nature_id or \
+ self.listed_building_id or \
+ self.listed_building_notes or \
+ self.listed_building_date
+
+ @property
def has_museum_section(self):
- if get_current_profile().museum and self.mark:
+ if self.mark or self.mark_text:
return True
for field in self._meta.get_fields():
- if not field.name.startswith("museum_"):
+ if not field.name.startswith("museum_") and not field.name.startswith("iconograph"):
continue
instanced_field = getattr(self, field.name)
if instanced_field and (not field.many_to_many or instanced_field.count()):
return True
+
return False
@property
diff --git a/archaeological_finds/templates/ishtar/sheet_find.html b/archaeological_finds/templates/ishtar/sheet_find.html
index ac1ae4f05..b3663bbbc 100644
--- a/archaeological_finds/templates/ishtar/sheet_find.html
+++ b/archaeological_finds/templates/ishtar/sheet_find.html
@@ -124,6 +124,7 @@
<div class='row'>
{% field_flex "Denomination" item.denomination %}
+ {% field_flex _("Title") item.title %}
{% field_flex "Complete museum ID" item.cache_complete_museum_id %}
{% field_flex "Free ID" item.label %}
{% field_flex "Previous ID" item.previous_id %}
@@ -139,6 +140,7 @@
{% field_flex_full "Public description" item.public_description "<pre>" "</pre>" %}
{% field_flex "Is complete?" item.is_complete %}
{% with material=item.get_hierarchical_material_types %}{% if material %}
+ {% field_flex_detail_multiple _("Actors") item.actors %}
{% field_flex "Material types" material %}{% else %}
{% field_flex_multiple_obj "Material types" item 'material_types' %}
{% endif %}{% endwith %}
@@ -162,6 +164,16 @@
{% field_flex_full _("General comment") item.comment "<pre>" "</pre>" %}
</div>
+ {% if item.has_listed_building_section %}
+ <h3>{% trans "Listed building" %}</h3>
+ <div class='row'>
+ {% field_flex _("Nature of listed buildings protection") item.listed_building_protection_nature %}
+ {% field_flex _("Listed building ID") item.listed_building_id %}
+ {% field_flex _("Date of listing as a listed building") item.listed_building_date|date:"SHORT_DATE_FORMAT" %}
+ {% field_flex _("Notes on listed building") item.listed_building_notes %}
+ </div>
+ {% endif %}
+
{% if item.has_ownership_section %}
<h3>{% trans "Ownership" %}</h3>
<div class='row'>
@@ -187,8 +199,11 @@
{% 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_detail_multiple _("Donors, testators or vendors") item.museum_donors %}
+ {% field_flex_multiple_obj _("Iconographic patterns") item 'iconographic_patterns' %}
+ {% field_flex_full _("Notes on iconography") item.iconography_notes "<pre>" "</pre>" %}
{% 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 _("Transcription of the marking") item.mark_text %}
{% field_flex "Marking details" item.mark "<pre>" "</pre>" %}
{% field_flex "Conformity with inventory" item.museum_inventory_conformity %}
{% field_flex "Comment on conformity" item.museum_conformity_comment %}
@@ -223,7 +238,7 @@
{% endif %}
{% if not is_external %}
- {% if item.history_creator or item.last_edition_date or item.created %}
+ {% if item.history_creator or item.last_edition_date or item.created or item.editors.count %}
<h3>{% trans "Sheet" %}</h3>
<div class='row'>
{% trans "Checked" as checked_label %}
diff --git a/archaeological_finds/templates/ishtar/sheet_find_treatments.html b/archaeological_finds/templates/ishtar/sheet_find_treatments.html
index 49e70d5f8..a36b361ce 100644
--- a/archaeological_finds/templates/ishtar/sheet_find_treatments.html
+++ b/archaeological_finds/templates/ishtar/sheet_find_treatments.html
@@ -15,6 +15,7 @@
{% field_flex_multiple_obj _("Integrity") item 'integrities' %}
{% field_flex_multiple_obj _("Remarkability") item 'remarkabilities' %}
{% field_flex_multiple_obj _("Conservatory states") item 'conservatory_states' %}
+ {% field_flex_full _("Conservatory state details") item.conservatory_states_details "<pre>" "</pre>" %}
{% field_flex_multiple_obj _("Alteration") item 'alterations' %}
{% field_flex_multiple_obj _("Alteration cause") item 'alteration_causes' %}
{% field_flex_multiple_obj _("Recommended treatments") item 'recommended_treatments' %}
diff --git a/archaeological_finds/templates/ishtar/sheet_museum_find.html b/archaeological_finds/templates/ishtar/sheet_museum_find.html
index add8ce512..b97143e15 100644
--- a/archaeological_finds/templates/ishtar/sheet_museum_find.html
+++ b/archaeological_finds/templates/ishtar/sheet_museum_find.html
@@ -124,6 +124,7 @@
<div class='row'>
{% field_flex "Denomination" item.denomination %}
+ {% field_flex _("Title") item.title %}
{% field_flex "Complete museum ID" item.cache_complete_museum_id %}
{% field_flex "Free ID" item.label %}
{% field_flex "Previous ID" item.previous_id %}
@@ -139,6 +140,7 @@
{% field_flex_full "Public description" item.public_description "<pre>" "</pre>" %}
{% field_flex "Is complete?" item.is_complete %}
{% with material=item.get_hierarchical_material_types %}{% if material %}
+ {% field_flex_detail_multiple _("Actors") item.actors %}
{% field_flex "Material types" material %}{% else %}
{% field_flex_multiple_obj "Material types" item 'material_types' %}
{% endif %}{% endwith %}
@@ -162,6 +164,16 @@
{% field_flex_full _("General comment") item.comment "<pre>" "</pre>" %}
</div>
+ {% if item.has_listed_building_section %}
+ <h3>{% trans "Listed building" %}</h3>
+ <div class='row'>
+ {% field_flex _("Nature of listed buildings protection") item.listed_building_protection_nature %}
+ {% field_flex _("Listed building ID") item.listed_building_id %}
+ {% field_flex _("Date of listing as a listed building") item.listed_building_date|date:"SHORT_DATE_FORMAT" %}
+ {% field_flex _("Notes on listed building") item.listed_building_notes %}
+ </div>
+ {% endif %}
+
{% if item.has_ownership_section %}
<h3>{% trans "Ownership" %}</h3>
<div class='row'>
@@ -187,8 +199,11 @@
{% 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_detail_multiple _("Donors, testators or vendors") item.museum_donors %}
+ {% field_flex_multiple_obj _("Iconographic patterns") item 'iconographic_patterns' %}
+ {% field_flex_full _("Notes on iconography") item.iconography_notes "<pre>" "</pre>" %}
{% 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 _("Transcription of the marking") item.mark_text %}
{% field_flex "Marking details" item.mark "<pre>" "</pre>" %}
{% field_flex "Conformity with inventory" item.museum_inventory_conformity %}
{% field_flex "Comment on conformity" item.museum_conformity_comment %}
@@ -223,7 +238,7 @@
{% endif %}
{% if not is_external %}
- {% if item.history_creator or item.last_edition_date or item.created %}
+ {% if item.history_creator or item.last_edition_date or item.created or item.editors.count %}
<h3>{% trans "Sheet" %}</h3>
<div class='row'>
{% trans "Checked" as checked_label %}