From 7f516f78ef49ed55878db9922c47ea07561b8b23 Mon Sep 17 00:00:00 2001 From: Caleb Date: Tue, 27 Mar 2018 12:33:19 -0600 Subject: [PATCH] Hide create new button for single files. --- src/components/Editor/EditorToolbar.js | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/components/Editor/EditorToolbar.js b/src/components/Editor/EditorToolbar.js index 8f4b4ede9f1d..c6c1d5de0aa4 100644 --- a/src/components/Editor/EditorToolbar.js +++ b/src/components/Editor/EditorToolbar.js @@ -50,7 +50,7 @@ export default class EditorToolbar extends React.Component { }; renderSimplePublishControls = () => { - const { onPersist, onPersistAndNew, isPersisting, hasChanged, isNewEntry } = this.props; + const { collection, onPersist, onPersistAndNew, isPersisting, hasChanged, isNewEntry } = this.props; if (!isNewEntry && !hasChanged) { return
Published
; } @@ -64,7 +64,11 @@ export default class EditorToolbar extends React.Component { label={isPersisting ? 'Publishing...' : 'Publish'} > - + { + collection.get('create') + ? + : null + } ); @@ -106,6 +110,7 @@ export default class EditorToolbar extends React.Component { renderWorkflowPublishControls = () => { const { + collection, onPersist, onPersistAndNew, isUpdatingStatus, @@ -152,7 +157,11 @@ export default class EditorToolbar extends React.Component { label={isPublishing ? 'Publishing...' : 'Publish'} > - + { + collection.get('create') + ? + : null + } ]; }