diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2020-12-08 18:49:13 +0100 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2021-02-28 12:15:22 +0100 |
commit | a51aec0053b95dcc0fb93dcfb0ad3be95ff39839 (patch) | |
tree | 3282449aa7f74c0156dc3639a8039542da55e6d8 /archaeological_files/models.py | |
parent | 46e930e758d48318bc009e3ef3a06d98610721d9 (diff) | |
download | Ishtar-a51aec0053b95dcc0fb93dcfb0ad3be95ff39839.tar.bz2 Ishtar-a51aec0053b95dcc0fb93dcfb0ad3be95ff39839.zip |
Sheet files: add operation shortcut
Diffstat (limited to 'archaeological_files/models.py')
-rw-r--r-- | archaeological_files/models.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/archaeological_files/models.py b/archaeological_files/models.py index 4b0501e96..bef7d53a1 100644 --- a/archaeological_files/models.py +++ b/archaeological_files/models.py @@ -719,6 +719,17 @@ class File(ClosedItem, DocumentItem, BaseHistorizedItem, CompleteIdentifierItem, _("Add associated administrative act"), "fa fa-plus", _("admin. act"), "", False), ] + if self.can_do(request, 'add_operation'): + actions += [ + ( + reverse('file-add-operation', args=[self.pk]), + _("Add operation"), + "fa fa-plus", + _("operation"), + "", + False + ) + ] return actions def save(self, *args, **kwargs): |