diff --git a/classes/mail/mailables/EditorialReminder.php b/classes/mail/mailables/EditorialReminder.php index 10411380e37..e2648760ccc 100644 --- a/classes/mail/mailables/EditorialReminder.php +++ b/classes/mail/mailables/EditorialReminder.php @@ -72,9 +72,10 @@ public function setOutstandingTasks(array $outstanding, array $submissions, int Application::get()->getRequest(), Application::ROUTE_PAGE, $this->context->getPath(), - 'workflow', - 'access', - [$submission->getId()] + 'dashboard', + 'editorial', + null, + ['workflowSubmissionId' => $submission->getId()] ); $outstandingTasks[] = ' diff --git a/classes/mail/variables/SubmissionEmailVariable.php b/classes/mail/variables/SubmissionEmailVariable.php index 9f1d11a1ca7..c234b7dbc99 100644 --- a/classes/mail/variables/SubmissionEmailVariable.php +++ b/classes/mail/variables/SubmissionEmailVariable.php @@ -127,9 +127,10 @@ protected function getSubmissionUrl(Context $context): string $request, PKPApplication::ROUTE_PAGE, $context->getData('urlPath'), - 'workflow', - 'access', - [$this->submission->getId()] + 'dashboard', + 'editorial', + null, + ['workflowSubmissionId' => $this->submission->getId()] ); } diff --git a/classes/notification/PKPNotificationManager.php b/classes/notification/PKPNotificationManager.php index e5125c0fb97..cd0168c78bc 100644 --- a/classes/notification/PKPNotificationManager.php +++ b/classes/notification/PKPNotificationManager.php @@ -59,7 +59,7 @@ public function getNotificationUrl(PKPRequest $request, Notification $notificati if ($notification->assocType != Application::ASSOC_TYPE_SUBMISSION) { throw new \Exception('Unexpected assoc type!'); } - return $dispatcher->url($request, PKPApplication::ROUTE_PAGE, $context->getPath(), 'workflow', 'access', [$notification->assocId]); + return $dispatcher->url($request, PKPApplication::ROUTE_PAGE, $context->getPath(), 'dashboard', 'editorial', null, ['workflowSubmissionId' => $notification->assocId]); case Notification::NOTIFICATION_TYPE_REVIEWER_COMMENT: if ($notification->assocType != Application::ASSOC_TYPE_REVIEW_ASSIGNMENT) { throw new \Exception('Unexpected assoc type!'); diff --git a/classes/notification/managerDelegate/PKPApproveSubmissionNotificationManager.php b/classes/notification/managerDelegate/PKPApproveSubmissionNotificationManager.php index 81d7617c2c8..88925728653 100644 --- a/classes/notification/managerDelegate/PKPApproveSubmissionNotificationManager.php +++ b/classes/notification/managerDelegate/PKPApproveSubmissionNotificationManager.php @@ -32,7 +32,7 @@ public function getNotificationUrl(PKPRequest $request, Notification $notificati { $dispatcher = Application::get()->getDispatcher(); $context = $request->getContext(); - return $dispatcher->url($request, PKPApplication::ROUTE_PAGE, $context->getPath(), 'workflow', 'access', [$notification->assocId]); + return $dispatcher->url($request, PKPApplication::ROUTE_PAGE, $context->getPath(), 'dashboard', 'editorial', null, ['workflowSubmissionId' => $notification->assocId]); } /** diff --git a/classes/notification/managerDelegate/PKPEditingProductionStatusNotificationManager.php b/classes/notification/managerDelegate/PKPEditingProductionStatusNotificationManager.php index 31716876629..d3d4572de0c 100644 --- a/classes/notification/managerDelegate/PKPEditingProductionStatusNotificationManager.php +++ b/classes/notification/managerDelegate/PKPEditingProductionStatusNotificationManager.php @@ -60,7 +60,7 @@ public function getNotificationUrl(PKPRequest $request, Notification $notificati if ($notification->assocType != Application::ASSOC_TYPE_SUBMISSION) { throw new \Exception('Unexpected assoc type for notification!'); } - return $dispatcher->url($request, PKPApplication::ROUTE_PAGE, $context->getPath(), 'workflow', 'access', [$notification->assocId]); + return $dispatcher->url($request, PKPApplication::ROUTE_PAGE, $context->getPath(), 'dashboard', 'editorial', null, ['workflowSubmissionId' => $notification->assocId]); } throw new \Exception('Unmatched notification type!'); } diff --git a/classes/services/PKPNavigationMenuService.php b/classes/services/PKPNavigationMenuService.php index f5fd91b0561..b94fc6f102b 100755 --- a/classes/services/PKPNavigationMenuService.php +++ b/classes/services/PKPNavigationMenuService.php @@ -300,14 +300,11 @@ public function getDisplayStatus(&$navigationMenuItem, &$navigationMenu) break; case NavigationMenuItem::NMI_TYPE_USER_DASHBOARD: if ($currentUser->hasRole([Role::ROLE_ID_MANAGER, Role::ROLE_ID_ASSISTANT, Role::ROLE_ID_REVIEWER, Role::ROLE_ID_AUTHOR], $contextId) || $currentUser->hasRole([Role::ROLE_ID_SITE_ADMIN], PKPApplication::SITE_CONTEXT_ID)) { - $navigationMenuItem->setUrl($dispatcher->url( - $request, - PKPApplication::ROUTE_PAGE, - null, - 'submissions', - null, - null - )); + $pkpPageRouter = $request->getRouter(); /** @var \PKP\core\PKPPageRouter $pkpPageRouter */ + $pkpPageRouter->getHomeUrl($request); + + + $navigationMenuItem->setUrl($pkpPageRouter->getHomeUrl($request)); } else { $navigationMenuItem->setUrl($dispatcher->url( $request, diff --git a/controllers/grid/users/stageParticipant/StageParticipantGridHandler.php b/controllers/grid/users/stageParticipant/StageParticipantGridHandler.php index 71f6830f6ad..b351c5bbb68 100644 --- a/controllers/grid/users/stageParticipant/StageParticipantGridHandler.php +++ b/controllers/grid/users/stageParticipant/StageParticipantGridHandler.php @@ -147,9 +147,10 @@ public function initialize($request, $args = null) $request, PKPApplication::ROUTE_PAGE, null, - 'workflow', - 'access', - [$submissionId] + 'dashboard', + 'editorial', + null, + ['workflowSubmissionId' => $submissionId] ); $this->addAction( new LinkAction( diff --git a/pages/authorDashboard/PKPAuthorDashboardHandler.php b/pages/authorDashboard/PKPAuthorDashboardHandler.php index c65036023d9..93cc28b8713 100644 --- a/pages/authorDashboard/PKPAuthorDashboardHandler.php +++ b/pages/authorDashboard/PKPAuthorDashboardHandler.php @@ -29,6 +29,7 @@ use PKP\components\forms\publication\PKPMetadataForm; use PKP\components\forms\publication\TitleAbstractForm; use PKP\components\listPanels\ContributorsListPanel; +use PKP\config\Config; use PKP\context\Context; use PKP\core\JSONMessage; use PKP\core\PKPApplication; @@ -91,6 +92,13 @@ public function authorize($request, &$args, $roleAssignments) */ public function submission($args, $request) { + if (Config::getVar('features', 'enable_new_submission_listing')) { + $submission = $this->getAuthorizedContextObject(Application::ASSOC_TYPE_SUBMISSION); + $router = $request->getRouter(); + return $request->redirectUrl($router->url($request, null, 'dashboard', 'mySubmissions', null, ['workflowSubmissionId' => $submission->getId()])); + } + + // Pass the authorized submission on to the template. $this->setupTemplate($request); diff --git a/pages/decision/DecisionHandler.php b/pages/decision/DecisionHandler.php index 94e69508b31..3f43010f133 100644 --- a/pages/decision/DecisionHandler.php +++ b/pages/decision/DecisionHandler.php @@ -162,9 +162,10 @@ public function record($args, $request) $request, Application::ROUTE_PAGE, $context->getData('urlPath'), - 'workflow', - 'access', - [$this->submission->getId()] + 'dashboard', + 'editorial', + null, + ['workflowSubmissionId' => $this->submission->getId()] ), 'submissionApiUrl' => $dispatcher->url( $request, @@ -237,9 +238,10 @@ protected function getBreadcrumb(Submission $submission, Context $context, Reque $request, Application::ROUTE_PAGE, $context->getData('urlPath'), - 'workflow', - 'access', - [$submission->getId()] + 'dashboard', + 'editorial', + null, + ['workflowSubmissionId' => $submission->getId()] ), ], [ diff --git a/pages/workflow/PKPWorkflowHandler.php b/pages/workflow/PKPWorkflowHandler.php index 61efd0f96b3..0ee6c7a9edc 100644 --- a/pages/workflow/PKPWorkflowHandler.php +++ b/pages/workflow/PKPWorkflowHandler.php @@ -106,6 +106,7 @@ public function authorize($request, &$args, $roleAssignments) */ public function access($args, $request) { + $submission = $this->getAuthorizedContextObject(Application::ASSOC_TYPE_SUBMISSION); $currentStageId = $submission->getData('stageId'); @@ -149,6 +150,14 @@ public function access($args, $request) */ public function index($args, $request) { + + if (Config::getVar('features', 'enable_new_submission_listing')) { + $submission = $this->getAuthorizedContextObject(Application::ASSOC_TYPE_SUBMISSION); + $router = $request->getRouter(); + return $request->redirectUrl($router->url($request, null, 'dashboard', 'editorial', null, ['workflowSubmissionId' => $submission->getId()])); + } + + $this->setupTemplate($request); $templateMgr = TemplateManager::getManager($request); diff --git a/templates/layouts/backend.tpl b/templates/layouts/backend.tpl index f916030adbf..17ee06a17ce 100644 --- a/templates/layouts/backend.tpl +++ b/templates/layouts/backend.tpl @@ -128,11 +128,6 @@ {/if}