This commit is contained in:
parent
85550eba9e
commit
724d172cf0
@ -378,7 +378,7 @@ class EditorToolbar extends React.Component {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
renderExistingEntryWorkflowPublishControls = ({ canCreate, canPublish }) => {
|
renderExistingEntryWorkflowPublishControls = ({ canCreate, canPublish, canDelete }) => {
|
||||||
const { unPublish, onDuplicate, isPersisting, t } = this.props;
|
const { unPublish, onDuplicate, isPersisting, t } = this.props;
|
||||||
|
|
||||||
return canPublish || canCreate ? (
|
return canPublish || canCreate ? (
|
||||||
@ -393,7 +393,7 @@ class EditorToolbar extends React.Component {
|
|||||||
</PublishedToolbarButton>
|
</PublishedToolbarButton>
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{canPublish && (
|
{canDelete && canPublish && (
|
||||||
<DropdownItem
|
<DropdownItem
|
||||||
label={t('editor.editorToolbar.unpublish')}
|
label={t('editor.editorToolbar.unpublish')}
|
||||||
icon="arrow"
|
icon="arrow"
|
||||||
@ -537,6 +537,7 @@ class EditorToolbar extends React.Component {
|
|||||||
|
|
||||||
const canCreate = collection.get('create');
|
const canCreate = collection.get('create');
|
||||||
const canPublish = collection.get('publish') && !useOpenAuthoring;
|
const canPublish = collection.get('publish') && !useOpenAuthoring;
|
||||||
|
const canDelete = collection.get('delete', true);
|
||||||
|
|
||||||
if (currentStatus) {
|
if (currentStatus) {
|
||||||
return (
|
return (
|
||||||
@ -555,7 +556,7 @@ class EditorToolbar extends React.Component {
|
|||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{this.renderDeployPreviewControls(t('editor.editorToolbar.deployButtonLabel'))}
|
{this.renderDeployPreviewControls(t('editor.editorToolbar.deployButtonLabel'))}
|
||||||
{this.renderExistingEntryWorkflowPublishControls({ canCreate, canPublish })}
|
{this.renderExistingEntryWorkflowPublishControls({ canCreate, canPublish, canDelete })}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user