From fde64d335fb6099866967ad7a03ac50ce7e332a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jarda=20Kot=C4=9B=C5=A1ovec?= Date: Wed, 8 Jan 2025 11:02:55 +0100 Subject: [PATCH] pkp/pkp-lib#10767 Bring back preview button for unpublished submission --- .../workflowConfigEditorialOJS.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/pages/workflow/composables/useWorkflowConfig/workflowConfigEditorialOJS.js b/src/pages/workflow/composables/useWorkflowConfig/workflowConfigEditorialOJS.js index 71a6cea9..736ccdd8 100644 --- a/src/pages/workflow/composables/useWorkflowConfig/workflowConfigEditorialOJS.js +++ b/src/pages/workflow/composables/useWorkflowConfig/workflowConfigEditorialOJS.js @@ -47,6 +47,20 @@ export function getHeaderItems({ }); } + if ( + submission.status !== pkp.const.STATUS_PUBLISHED && + (submission.stageId === pkp.const.WORKFLOW_STAGE_ID_EDITING || + submission.stageId === pkp.const.WORKFLOW_STAGE_ID_PRODUCTION) + ) { + actions.push({ + component: 'WorkflowActionButton', + props: { + label: t('common.preview'), + action: Actions.WORKFLOW_VIEW_PUBLISHED_SUBMISSION, + }, + }); + } + if (permissions.canAccessEditorialHistory) { actions.push({ component: 'WorkflowActionButton',