summaryrefslogtreecommitdiff
path: root/ishtar_common/models.py
diff options
context:
space:
mode:
authorCefin <kevon@tuta.io>2021-11-29 12:07:47 +0000
committerÉtienne Loks <etienne.loks@iggdrasil.net>2022-07-08 09:58:49 +0200
commitde735baa576e415ea6f78c8665e17f2a20c68a38 (patch)
treed4a1e401fc9c56d3106c36aaa42254605978bc75 /ishtar_common/models.py
parent15f1921fb5fc886024fe004be5a4783bfd0a5533 (diff)
downloadIshtar-de735baa576e415ea6f78c8665e17f2a20c68a38.tar.bz2
Ishtar-de735baa576e415ea6f78c8665e17f2a20c68a38.zip
rapid action add document with parent source #5172
Diffstat (limited to 'ishtar_common/models.py')
-rw-r--r--ishtar_common/models.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/ishtar_common/models.py b/ishtar_common/models.py
index e87e6c5a2..197ac5dcc 100644
--- a/ishtar_common/models.py
+++ b/ishtar_common/models.py
@@ -4210,6 +4210,18 @@ class Document(
True,
)
)
+ can_create_document = self.can_do(request, "add_document")
+ if can_create_document:
+ actions += [
+ (
+ reverse("create-document-source", args=[self.pk]),
+ _("Add document with source parent"),
+ "fa fa-plus",
+ _("Doc./src"),
+ "",
+ False,
+ )
+ ]
return actions
@property