addRoleAssignment( [ Role::ROLE_ID_SUB_EDITOR, Role::ROLE_ID_MANAGER, Role::ROLE_ID_SITE_ADMIN, Role::ROLE_ID_ASSISTANT ], [ 'fetchGrid', 'fetchCategory', 'fetchRow', 'addFile', 'downloadFile', 'deleteFile', 'updateCopyeditFiles' ] ); // Set the grid title. $this->setTitle('submission.copyedited'); } // // Public handler methods // /** * Save 'manage copyedited files' form * * @param array $args * @param PKPRequest $request * * @return JSONMessage JSON object */ public function updateCopyeditFiles($args, $request) { $submission = $this->getSubmission(); $manageCopyeditFilesForm = new ManageCopyeditFilesForm($submission->getId()); $manageCopyeditFilesForm->readInputData(); if ($manageCopyeditFilesForm->validate()) { $manageCopyeditFilesForm->execute( $this->getGridCategoryDataElements($request, $this->getStageId()) ); if ($submission->getStageId() == WORKFLOW_STAGE_ID_EDITING || $submission->getStageId() == WORKFLOW_STAGE_ID_PRODUCTION) { $notificationMgr = new NotificationManager(); $notificationMgr->updateNotification( $request, [ PKPNotification::NOTIFICATION_TYPE_ASSIGN_COPYEDITOR, PKPNotification::NOTIFICATION_TYPE_AWAITING_COPYEDITS, ], null, Application::ASSOC_TYPE_SUBMISSION, $submission->getId() ); } // Let the calling grid reload itself return \PKP\db\DAO::getDataChangedEvent(); } else { return new JSONMessage(false); } } }