@@ -50,7 +50,7 @@ export default class EditorToolbar extends React.Component {
50
50
} ;
51
51
52
52
renderSimplePublishControls = ( ) => {
53
- const { onPersist, onPersistAndNew, isPersisting, hasChanged, isNewEntry } = this . props ;
53
+ const { collection , onPersist, onPersistAndNew, isPersisting, hasChanged, isNewEntry } = this . props ;
54
54
if ( ! isNewEntry && ! hasChanged ) {
55
55
return < div className = "nc-entryEditor-toolbar-statusPublished" > Published</ div > ;
56
56
}
@@ -64,7 +64,11 @@ export default class EditorToolbar extends React.Component {
64
64
label = { isPersisting ? 'Publishing...' : 'Publish' }
65
65
>
66
66
< DropdownItem label = "Publish now" icon = "arrow" iconDirection = "right" onClick = { onPersist } />
67
- < DropdownItem label = "Publish and create new" icon = "add" onClick = { onPersistAndNew } />
67
+ {
68
+ collection . get ( 'create' )
69
+ ? < DropdownItem label = "Publish and create new" icon = "add" onClick = { onPersistAndNew } />
70
+ : null
71
+ }
68
72
</ Dropdown >
69
73
</ div >
70
74
) ;
@@ -106,6 +110,7 @@ export default class EditorToolbar extends React.Component {
106
110
107
111
renderWorkflowPublishControls = ( ) => {
108
112
const {
113
+ collection,
109
114
onPersist,
110
115
onPersistAndNew,
111
116
isUpdatingStatus,
@@ -152,7 +157,11 @@ export default class EditorToolbar extends React.Component {
152
157
label = { isPublishing ? 'Publishing...' : 'Publish' }
153
158
>
154
159
< DropdownItem label = "Publish now" icon = "arrow" iconDirection = "right" onClick = { onPublish } />
155
- < DropdownItem label = "Publish and create new" icon = "add" onClick = { onPublishAndNew } />
160
+ {
161
+ collection . get ( 'create' )
162
+ ? < DropdownItem label = "Publish and create new" icon = "add" onClick = { onPublishAndNew } />
163
+ : null
164
+ }
156
165
</ Dropdown >
157
166
] ;
158
167
}
0 commit comments