From d02c120e509b84ea77158afa80cc990f71644a1a Mon Sep 17 00:00:00 2001 From: Bel LaPointe Date: Thu, 17 Feb 2022 12:19:19 -0700 Subject: [PATCH] if readonly, do not draw add-child button in tree --- server/public/ui/templates/_filetree.ctmpl | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/server/public/ui/templates/_filetree.ctmpl b/server/public/ui/templates/_filetree.ctmpl index f8af0bd..0e796ed 100644 --- a/server/public/ui/templates/_filetree.ctmpl +++ b/server/public/ui/templates/_filetree.ctmpl @@ -53,11 +53,15 @@ const title=id ? branch.Leaf.Meta.Title : "ROOT" const isLiveParent = '{{ .This.ID }}'.slice(0, id.length) == id const isLive = '{{ .This.ID }}' == id - return ` + const linkToFile = `
- - + + + ` + return linkToFile + (branch.Leaf.Meta.ReadOnly ? "" : ``) } function branchesHTML(id, branches) { if (!branchesHaveContent(branches))