diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-11-22 00:32:45 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-11-22 00:32:45 +0100 |
commit | d14087709e3be22f718ce4c1b161d98f55211802 (patch) | |
tree | dbd4ba7ca6a3af5a1809c00cb2bace7cca932fcd /archaeological_context_records/models.py | |
parent | 2a8bf8285dcf0a3328207fa253fd652f0b9cded9 (diff) | |
download | Ishtar-d14087709e3be22f718ce4c1b161d98f55211802.tar.bz2 Ishtar-d14087709e3be22f718ce4c1b161d98f55211802.zip |
Quick action context record: change position of +find button (refs #5184)
Diffstat (limited to 'archaeological_context_records/models.py')
-rw-r--r-- | archaeological_context_records/models.py | 24 |
1 files changed, 12 insertions, 12 deletions
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 |