From d14087709e3be22f718ce4c1b161d98f55211802 Mon Sep 17 00:00:00 2001 From: Étienne Loks Date: Mon, 22 Nov 2021 00:32:45 +0100 Subject: Quick action context record: change position of +find button (refs #5184) --- archaeological_context_records/models.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'archaeological_context_records/models.py') diff --git a/archaeological_context_records/models.py b/archaeological_context_records/models.py index fd917efa3..861f5581f 100644 --- a/archaeological_context_records/models.py +++ b/archaeological_context_records/models.py @@ -985,18 +985,6 @@ class ContextRecord( actions = super(ContextRecord, self).get_extra_actions(request) # is_locked = hasattr(self, "is_locked") and self.is_locked(request.user) - can_edit_cr = self.can_do(request, "change_contextrecord") - if can_edit_cr: - actions += [ - ( - reverse("contextrecord-qa-duplicate", args=[self.pk]), - _("Duplicate"), - "fa fa-clone", - "", - "", - True, - ), - ] can_create_find = self.can_do(request, "add_find") if can_create_find: actions += [ @@ -1009,6 +997,18 @@ class ContextRecord( False, ), ] + can_edit_cr = self.can_do(request, "change_contextrecord") + if can_edit_cr: + actions += [ + ( + reverse("contextrecord-qa-duplicate", args=[self.pk]), + _("Duplicate"), + "fa fa-clone", + "", + "", + True, + ), + ] return actions @classmethod -- cgit v1.2.3