From 01afb9eb94eaeb659a02aa635629742207c13265 Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Tue, 4 Aug 2020 22:43:40 -0700 Subject: [PATCH] consistency --- app/components/Breadcrumb.js | 2 +- app/menus/DocumentMenu.js | 8 ++++---- app/scenes/Document/components/Document.js | 2 +- app/scenes/Document/components/Header.js | 2 +- app/scenes/DocumentDelete.js | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/app/components/Breadcrumb.js b/app/components/Breadcrumb.js index 388daaeff1..6965e50207 100644 --- a/app/components/Breadcrumb.js +++ b/app/components/Breadcrumb.js @@ -50,7 +50,7 @@ const Breadcrumb = observer(({ document, collections, onlyText }: Props) => { ); } - const isTemplate = document.template; + const isTemplate = document.isTemplate; const isDraft = !document.publishedAt && !isTemplate; const isNestedDocument = path.length > 1; const lastPath = path.length ? path[path.length - 1] : undefined; diff --git a/app/menus/DocumentMenu.js b/app/menus/DocumentMenu.js index 0977ebc368..cc9e7e8be4 100644 --- a/app/menus/DocumentMenu.js +++ b/app/menus/DocumentMenu.js @@ -219,15 +219,15 @@ class DocumentMenu extends React.Component { New nested document )} - {can.update && ( - Edit - )} {can.update && - !document.template && ( + !document.isTemplate && ( Create template… )} + {can.update && ( + Edit + )} {can.update && ( Duplicate diff --git a/app/scenes/Document/components/Document.js b/app/scenes/Document/components/Document.js index 8c6bdd1d83..114c37ff55 100644 --- a/app/scenes/Document/components/Document.js +++ b/app/scenes/Document/components/Document.js @@ -446,7 +446,7 @@ class DocumentScene extends React.Component { }} isShare={isShare} isDraft={document.isDraft} - template={document.template} + template={document.isTemplate} key={disableEmbeds ? "embeds-disabled" : "embeds-enabled"} title={revision ? revision.title : this.title} document={document} diff --git a/app/scenes/Document/components/Header.js b/app/scenes/Document/components/Header.js index 4d878a947d..1232116d27 100644 --- a/app/scenes/Document/components/Header.js +++ b/app/scenes/Document/components/Header.js @@ -133,7 +133,7 @@ class Header extends React.Component { const share = shares.getByDocumentId(document.id); const isPubliclyShared = share && share.published; - const isTemplate = document.template; + const isTemplate = document.isTemplate; const can = policies.abilities(document.id); const canShareDocuments = auth.team && auth.team.sharing && can.share; const canToggleEmbeds = auth.team && auth.team.documentEmbeds; diff --git a/app/scenes/DocumentDelete.js b/app/scenes/DocumentDelete.js index a51cdcb757..203bf9491e 100644 --- a/app/scenes/DocumentDelete.js +++ b/app/scenes/DocumentDelete.js @@ -51,7 +51,7 @@ class DocumentDelete extends React.Component { Are you sure about that? Deleting the{" "} {document.titleWithDefault} {document.noun} will - delete all of its history{document.template + delete all of its history{document.isTemplate ? "" : ", and any nested documents"}.