From 9ee2d65527082da0167b8c4c92faf16f8e25d3b1 Mon Sep 17 00:00:00 2001 From: Cefin Date: Tue, 9 Nov 2021 12:37:30 +0100 Subject: Quick action context record - add a find (refs #5184) --- archaeological_context_records/models.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'archaeological_context_records') diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index d143ddd09..14ef1f62b 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -967,6 +967,18 @@ class ContextRecord( True, ), ] + can_create_find = self.can_do(request, "add_find") + if can_create_find: + actions += [ + ( + reverse("find_create", args=[self.pk]), + _("Add find"), + "fa fa-plus", + _("find"), + "", + True, + ), + ] return actions @classmethod -- cgit v1.2.3