diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-03-13 15:20:36 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2025-03-13 15:48:10 +0100 |
commit | 5b19b25aae5b4649ff43e5966e592c76cf90e807 (patch) | |
tree | 41620c7c59dbd964cf801a35ed02a15591d63f8d /ishtar_common | |
parent | ce71f7f286819ee1399fef5f1819f9cc812149a6 (diff) | |
download | Ishtar-5b19b25aae5b4649ff43e5966e592c76cf90e807.tar.bz2 Ishtar-5b19b25aae5b4649ff43e5966e592c76cf90e807.zip |
✨ exhibitions: link documents (refs #6222)
Diffstat (limited to 'ishtar_common')
-rw-r--r-- | ishtar_common/models.py | 11 | ||||
-rw-r--r-- | ishtar_common/templates/ishtar/sheet_document.html | 1 |
2 files changed, 12 insertions, 0 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py index 6a793e326..012bf920d 100644 --- a/ishtar_common/models.py +++ b/ishtar_common/models.py @@ -4623,6 +4623,7 @@ class Document( # order is important: put the image in the first match found # other will be symbolic links RELATED_MODELS = [ + "exhibitions", "treatment_files", "treatments", "finds", @@ -4646,6 +4647,7 @@ class Document( "administrativeacts", "warehouses", "containers", + "exhibitions", "treatments", "treatment_files", "towns", @@ -4664,6 +4666,8 @@ class Document( "context_records__pk"), (("archaeological_finds", "find"), "finds__pk"), + (("archaeological_finds", "exhibition"), + "exhibitions__pk"), (("archaeological_finds", "treatmentfile"), "treatment_files__pk"), (("archaeological_finds", "treatment"), @@ -4680,6 +4684,7 @@ class Document( "warehouses", "operations", "treatments", + "exhibitions", "files", "treatment_files", "administrativeacts", @@ -4726,6 +4731,7 @@ class Document( SearchVectorConfig("additional_information", "local"), ] BASE_SEARCH_VECTORS += [ + SearchVectorConfig("exhibitions__name"), SearchVectorConfig("treatment_files__name"), SearchVectorConfig("treatments__cached_label"), SearchVectorConfig("finds__cached_label"), @@ -4982,6 +4988,7 @@ class Document( ("warehouse", "warehouses__pk"), ("treatment", "treatments__pk"), ("treatmentfile", "treatment_files__pk"), + ("exhibition", "exhibitions__pk"), ("administrativeact", "administrativeacts__pk"), ] @@ -5009,6 +5016,10 @@ class Document( pgettext_lazy("key for text search", "treatment-file"), "cached_label", ), + "exhibition": ( + pgettext_lazy("key for text search", "exhibition"), + "cached_label", + ), } QA_EDIT = QuickAction( url="document-qa-bulk-update", diff --git a/ishtar_common/templates/ishtar/sheet_document.html b/ishtar_common/templates/ishtar/sheet_document.html index ca382f137..d2fa2d2ef 100644 --- a/ishtar_common/templates/ishtar/sheet_document.html +++ b/ishtar_common/templates/ishtar/sheet_document.html @@ -126,6 +126,7 @@ {% field_flex_full _("Context records") item.context_records|add_links %} {% field_flex_full _("Finds") item.finds|add_links %} {% field_flex_full _("Treatments") item.treatments|add_links %} +{% field_flex_full _("Exhibitions") item.exhibitions|add_links %} {% field_flex_full _("Treatment files") item.treatment_files|add_links %} {% field_flex_full _("Warehouses") item.warehouses|add_links %} {% field_flex_full _("Containers") item.containers|add_links %} |