/** * Constructor * @param $request Request * @param $monographId integer The monograph the file should be * uploaded to. * @param $uploaderRoles array The ids of all roles allowed to upload * in the context of this action. * @param $reviewType integer One of the REVIEW_TYPE_* constants. * @param $round integer The review round to upload to. */ function AddRevisionLinkAction(&$request, $monographId, $uploaderRoles, $reviewType, $round) { // Create the action arguments array. $actionArgs = array('fileStage' => MONOGRAPH_FILE_SUBMISSION, 'reviewType' => $reviewType, 'round' => $round, 'revisionOnly' => '1'); // Call the parent class constructor. parent::BaseAddFileLinkAction($request, $monographId, WORKFLOW_STAGE_ID_INTERNAL_REVIEW, $uploaderRoles, $actionArgs, __('editor.review.uploadRevisionToRound', array('round' => $round)), __('editor.review.uploadRevision')); }
/** * Constructor * @param $request Request * @param $reviewRound ReviewRound The review round to upload to. * @param $uploaderRoles array The ids of all roles allowed to upload * in the context of this action. * @param $uploaderGroupIds The user group IDs of all uploaders */ function AddRevisionLinkAction($request, $reviewRound, $uploaderRoles, $uploaderGroupIds = null) { // Bring in the submission file constants. import('lib.pkp.classes.submission.SubmissionFile'); // Create the action arguments array. $actionArgs = array('fileStage' => SUBMISSION_FILE_REVIEW_REVISION, 'stageId' => $reviewRound->getStageId(), 'reviewRoundId' => $reviewRound->getId(), 'revisionOnly' => '1'); // Call the parent class constructor. parent::BaseAddFileLinkAction($request, $reviewRound->getSubmissionId(), $reviewRound->getStageId(), $uploaderRoles, $uploaderGroupIds, $actionArgs, __('submission.review.uploadRevisionToRound', array('round' => $reviewRound->getRound())), __('submission.addFile')); }
/** * Constructor * @param $request Request * @param $monographId integer The monograph the file should be * uploaded to. * @param $stageId integer The workflow stage in which the file * uploader is being instantiated (one of the WORKFLOW_STAGE_ID_* * constants). * @param $uploaderRoles array The ids of all roles allowed to upload * in the context of this action. * @param $fileStage integer The file stage the file should be * uploaded to (one of the MONOGRAPH_FILE_* constants). * @param $assocType integer The type of the element the file should * be associated with (one fo the ASSOC_TYPE_* constants). * @param $assocId integer The id of the element the file should be * associated with. */ function AddFileLinkAction(&$request, $monographId, $stageId, $uploaderRoles, $fileStage, $assocType = null, $assocId = null) { // Create the action arguments array. $actionArgs = array('fileStage' => $fileStage); if (is_numeric($assocType) && is_numeric($assocId)) { $actionArgs['assocType'] = (int) $assocType; $actionArgs['assocId'] = (int) $assocId; } // Identify text labels based on the file stage. $textLabels = AddFileLinkAction::_getTextLabels($fileStage); // Call the parent class constructor. parent::BaseAddFileLinkAction($request, $monographId, $stageId, $uploaderRoles, $actionArgs, __($textLabels['wizardTitle']), __($textLabels['buttonLabel'])); }
/** * Constructor * @param $request Request * @param $submissionId integer The submission the file should be * uploaded to. * @param $stageId integer The workflow stage in which the file * uploader is being instantiated (one of the WORKFLOW_STAGE_ID_* * constants). * @param $uploaderRoles array The ids of all roles allowed to upload * in the context of this action. * @param $uploaderGroupIds array The ids of all allowed user groups * to upload in the context of this action, or null to permit all. * @param $fileStage integer The file stage the file should be * uploaded to (one of the SUBMISSION_FILE_* constants). * @param $assocType integer The type of the element the file should * be associated with (one fo the ASSOC_TYPE_* constants). * @param $assocId integer The id of the element the file should be * associated with. * @param $reviewRoundId int The current review round ID (if any) * @param $dependentFilesOnly bool whether to only include dependent * files in the Genres dropdown. */ function AddFileLinkAction($request, $submissionId, $stageId, $uploaderRoles, $uploaderGroupIds, $fileStage, $assocType = null, $assocId = null, $reviewRoundId = null, $dependentFilesOnly = false) { // Create the action arguments array. $actionArgs = array('fileStage' => $fileStage, 'reviewRoundId' => $reviewRoundId); if (is_numeric($assocType) && is_numeric($assocId)) { $actionArgs['assocType'] = (int) $assocType; $actionArgs['assocId'] = (int) $assocId; } if ($dependentFilesOnly) { $actionArgs['dependentFilesOnly'] = true; } // Identify text labels based on the file stage. $textLabels = AddFileLinkAction::_getTextLabels($fileStage); // Call the parent class constructor. parent::BaseAddFileLinkAction($request, $submissionId, $stageId, $uploaderRoles, $uploaderGroupIds, $actionArgs, __($textLabels['wizardTitle']), __($textLabels['buttonLabel'])); }