summaryrefslogtreecommitdiff
path: root/archaeological_finds
diff options
context:
space:
mode:
authorÉtienne Loks <etienne.loks@iggdrasil.net>2025-11-14 17:06:40 +0100
committerÉtienne Loks <etienne.loks@iggdrasil.net>2025-11-14 17:58:17 +0100
commit715c97d246c9375fc8cf055990c1f49c3efc9522 (patch)
tree7cc2e179b4411459690ddd455ca9e5962f64528b /archaeological_finds
parent6d902258dd5e1b96fe5849a47d280375c5b74a34 (diff)
downloadIshtar-715c97d246c9375fc8cf055990c1f49c3efc9522.tar.bz2
Ishtar-715c97d246c9375fc8cf055990c1f49c3efc9522.zip
✨ datings refactoring: add actions on sheet
Diffstat (limited to 'archaeological_finds')
-rw-r--r--archaeological_finds/models_finds.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/archaeological_finds/models_finds.py b/archaeological_finds/models_finds.py
index 8f295e4f8..5eed32772 100644
--- a/archaeological_finds/models_finds.py
+++ b/archaeological_finds/models_finds.py
@@ -2851,12 +2851,23 @@ class Find(
is_locked = hasattr(self, "is_locked") and self.is_locked(request.user)
profile = get_current_profile()
+ can_edit_find = self.can_do(request, "archaeological_finds.change_find")
+ if can_edit_find and not is_locked:
+ actions += [
+ (
+ reverse("find-dating-add", args=[self.pk]),
+ _("Add period"),
+ "fa fa-plus",
+ _("period"),
+ "",
+ True,
+ ),
+ ]
can_add_geo = profile.mapping and self.can_do(request,
"ishtar_common.add_geovectordata")
if can_add_geo:
if self.base_finds.count() == 1:
actions.append(self.base_finds.all()[0].get_add_geo_action())
- can_edit_find = self.can_do(request, "archaeological_finds.change_find")
if can_edit_find and not is_locked:
actions += [
(