summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2024-09-19 18:35:51 +0200
committerÉtienne Loks <etienne.loks@iggdrasil.net>2024-09-20 15:47:14 +0200
commitfc50391805b08914e740c518301dd16087b00028 (patch)
tree13ce43dc2747de96758bb3c318b6f703a473a724
parent80f8712a5d25a4b2c7c186b8f260561ea35441c1 (diff)
downloadIshtar-fc50391805b08914e740c518301dd16087b00028.tar.bz2
Ishtar-fc50391805b08914e740c518301dd16087b00028.zip
✨ archaeological sites sheet: add new fields - person sheet: add discoverer
-rw-r--r--archaeological_operations/models.py2
-rw-r--r--archaeological_operations/templates/ishtar/sheet_site.html9
-rw-r--r--ishtar_common/templates/ishtar/sheet_person.html5
3 files changed, 15 insertions, 1 deletions
diff --git a/archaeological_operations/models.py b/archaeological_operations/models.py
index 471c104c9..5ccaf9b23 100644
--- a/archaeological_operations/models.py
+++ b/archaeological_operations/models.py
@@ -585,7 +585,7 @@ class ArchaeologicalSite(
on_delete=models.SET_NULL, blank=True, null=True
)
discoverer = models.ForeignKey(Person, verbose_name=_("Discoverer"), on_delete=models.SET_NULL,
- blank=True, null=True)
+ blank=True, null=True, related_name="site_discovered")
nature_of_site = models.ForeignKey(NatureOfSiteType, verbose_name=_("Nature of site"),
on_delete=models.SET_NULL, blank=True, null=True)
interpretation_level = models.ForeignKey(
diff --git a/archaeological_operations/templates/ishtar/sheet_site.html b/archaeological_operations/templates/ishtar/sheet_site.html
index 6cc9a3454..718947e19 100644
--- a/archaeological_operations/templates/ishtar/sheet_site.html
+++ b/archaeological_operations/templates/ishtar/sheet_site.html
@@ -41,10 +41,18 @@
<div class="row">
{% field_flex "Other reference" item.other_reference %}
+ {% field_flex_multiple_obj _("Types") item 'types' %}
+ {% field_flex _("Discovery status") item.discovery_status %}
+ {% field_flex _("Current status") item.current_status %}
+ {% field_flex _("Nature of site") item.nature_of_site %}
+ {% field_flex _("Interpretation level") item.interpretation_level %}
{% field_flex_multiple_obj "Periods" item 'periods' %}
{% field_flex_multiple_obj "Remains" item 'remains' %}
{% field_flex_multiple_obj "Cultural attributions" item 'cultural_attributions' %}
+ {% field_flex_detail _("Discoverer") item.discoverer %}
{% field_flex_multiple "Collaborators" item.collaborators %}
+ {% field_flex_full _("Description") item.description "<pre>" "</pre>" %}
+ {% field_flex_full _("Public description") item.description "<pre>" "</pre>" %}
{% field_flex_full "Comment" item.comment "<pre>" "</pre>" %}
</div>
@@ -75,6 +83,7 @@
{% else %}
{% field_flex_detail_multiple_full "Towns" item.towns %}
{% endif %}
+ {% field_flex_full _("Precise locality") item.precise_locality "<pre>" "</pre>" %}
{% field_flex_full "National Geographic Institute locality" item.locality_ngi "<pre>" "</pre>" %}
{% field_flex_full "Cadastral locality" item.locality_cadastral "<pre>" "</pre>" %}
</div>
diff --git a/ishtar_common/templates/ishtar/sheet_person.html b/ishtar_common/templates/ishtar/sheet_person.html
index 54e12496d..7c3093df8 100644
--- a/ishtar_common/templates/ishtar/sheet_person.html
+++ b/ishtar_common/templates/ishtar/sheet_person.html
@@ -100,6 +100,11 @@
{% dynamic_table_document cira 'operations' 'cira_rapporteur__pk' item.pk '' output %}
{% endif %}
+{% trans "Associated archaeological sites as discoverer" as discoverer %}
+{% if item.site_discovered.count %}
+{% dynamic_table_document discoverer 'sites' 'discoverer_id' item.pk '' output %}
+{% endif %}
+
{% trans "Associated archaeological sites as collaborator" as colla %}
{% if item.site_collaborator.count %}
{% dynamic_table_document colla 'sites' 'collaborators__pk' item.pk '' output %}