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 | addb5e55aaa3ee2f5c0d9bb7a88092bbfc80ba5b (patch) | |
tree | 3282449aa7f74c0156dc3639a8039542da55e6d8 /archaeological_files/models.py | |
parent | b4d8ecfbe40a12def9abd8cc688c4a07d7c69838 (diff) | |
download | Ishtar-addb5e55aaa3ee2f5c0d9bb7a88092bbfc80ba5b.tar.bz2 Ishtar-addb5e55aaa3ee2f5c0d9bb7a88092bbfc80ba5b.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): |