/**
  * Fetch the modal content
  * @param $request PKPRequest
  * @see Form::fetch()
  */
 function fetch(&$request)
 {
     $templateMgr =& TemplateManager::getManager();
     $monograph =& $this->getMonograph();
     $this->setData('round', $monograph->getCurrentRound());
     return parent::fetch($request);
 }
 /**
  * @copydoc Form::fetch()
  */
 function fetch($request)
 {
     // No all decision forms need a review round.
     // Try to get a review round.
     $reviewRound = $this->getReviewRound();
     // If we have a review round, then we are in a review stage.
     if (is_a($reviewRound, 'ReviewRound')) {
         // URL to retrieve peer reviews:
         $router = $request->getRouter();
         $submission = $this->getSubmission();
         $stageId = $reviewRound->getStageId();
         $this->setData('peerReviewUrl', $router->url($request, null, null, 'importPeerReviews', null, array('submissionId' => $submission->getId(), 'stageId' => $stageId, 'reviewRoundId' => $reviewRound->getId())));
     }
     // When this form is being used in review stages, we need a different
     // save operation to allow the EditorDecisionHandler authorize the review
     // round object.
     if ($this->getSaveFormOperation()) {
         $templateMgr = TemplateManager::getManager($request);
         $templateMgr->assign('saveFormOperation', $this->getSaveFormOperation());
     }
     $templateMgr->assign('allowedVariables', $this->_getAllowedVariables($request));
     return parent::fetch($request);
 }
Example #3
0
 /**
  * Constructor.
  * @param $submission Submission
  * @param $decision int
  * @param stageid int
  */
 function NewReviewRoundForm($submission, $decision = SUBMISSION_EDITOR_DECISION_RESUBMIT, $stageId = null, $reviewRound)
 {
     parent::EditorDecisionForm($submission, $decision, $stageId, 'controllers/modals/editorDecision/form/newReviewRoundForm.tpl', $reviewRound);
     // WARNING: this constructor may be invoked dynamically by
     // EditorDecisionHandler::_instantiateEditorDecision.
 }
 /**
  * Constructor.
  * @param $submission Submission
  * @param $decision int SUBMISSION_EDITOR_DECISION_...
  * @param $stageId int WORKFLOW_STAGE_ID_...
  */
 function InitiateExternalReviewForm($submission, $decision, $stageId)
 {
     parent::EditorDecisionForm($submission, $decision, $stageId, 'controllers/modals/editorDecision/form/initiateExternalReviewForm.tpl');
 }
Example #5
0
 /**
  * Constructor.
  * @param $submission Submission
  */
 function InitiateReviewForm($submission, $decision, $stageId, $template)
 {
     parent::EditorDecisionForm($submission, $decision, $stageId, $template);
 }
 /**
  * Constructor.
  * @param $submission Submission
  * @param $decision int SUBMISSION_EDITOR_DECISION_...
  * @param $stageId int WORKFLOW_STAGE_ID_...
  */
 function InitiateExternalReviewForm($submission, $decision, $stageId)
 {
     AppLocale::requireComponents(LOCALE_COMPONENT_APP_SUBMISSION);
     parent::EditorDecisionForm($submission, $decision, $stageId, 'controllers/modals/editorDecision/form/initiateExternalReviewForm.tpl');
 }
 /**
  * Constructor.
  * @param $seriesEditorSubmission SeriesEditorSubmission
  */
 function NewReviewRoundForm($seriesEditorSubmission)
 {
     parent::EditorDecisionForm($seriesEditorSubmission, 'controllers/modals/editorDecision/form/newReviewRoundForm.tpl');
 }
 /**
  * @see Form::fetch()
  */
 function fetch(&$request)
 {
     // Review type.
     //FIXME #6409: What to do with reviewType?
     $reviewType = (int) $request->getUserVar('reviewType');
     $this->setData('reviewType', $reviewType);
     // Review round.
     $seriesEditorSubmission =& $this->getSeriesEditorSubmission();
     $round = (int) $request->getUserVar('round');
     if ($round > $seriesEditorSubmission->getCurrentRound() || $round < 0) {
         fatalError('Invalid review round!');
     }
     // URL to retrieve peer reviews:
     $router =& $request->getRouter();
     $submission =& $this->getSeriesEditorSubmission();
     $this->setData('peerReviewUrl', $router->url($request, null, null, 'importPeerReviews', null, array('monographId' => $submission->getId())));
     return parent::fetch($request, $round);
 }
Example #9
0
 /**
  * Fetch the modal content
  * @param $request PKPRequest
  * @see Form::fetch()
  */
 function fetch(&$request)
 {
     $monograph =& $this->getMonograph();
     $reviewType = (int) $request->getUserVar('reviewType');
     //FIXME #6102: What to do with reviewType?
     $round = (int) $request->getUserVar('round');
     assert($round <= $monograph->getCurrentRound() && $round >= 0);
     $templateMgr =& TemplateManager::getManager();
     $this->setData('reviewType', $reviewType);
     $this->setData('round', $round);
     return parent::fetch($request);
 }
 /**
  * @copydoc Form::fetch()
  */
 function fetch($request)
 {
     $templateMgr = TemplateManager::getManager($request);
     // On the review stage, determine if any reviews are available for import
     $stageId = $this->getStageId();
     if ($stageId == WORKFLOW_STAGE_ID_INTERNAL_REVIEW || $stageId == WORKFLOW_STAGE_ID_EXTERNAL_REVIEW) {
         $reviewsAvailable = false;
         $submission = $this->getSubmission();
         $reviewRound = $this->getReviewRound();
         $reviewAssignmentDao = DAORegistry::getDAO('ReviewAssignmentDAO');
         $reviewAssignments = $reviewAssignmentDao->getBySubmissionId($submission->getId(), $reviewRound->getId());
         foreach ($reviewAssignments as $reviewAssignment) {
             if ($reviewAssignment->getDateCompleted() != null && !$reviewAssignment->getCancelled()) {
                 $reviewsAvailable = true;
                 break;
             }
         }
         $templateMgr->assign('reviewsAvailable', $reviewsAvailable);
         // Retrieve a URL to fetch the reviews
         if ($reviewsAvailable) {
             $router = $request->getRouter();
             $this->setData('peerReviewUrl', $router->url($request, null, null, 'importPeerReviews', null, array('submissionId' => $submission->getId(), 'stageId' => $stageId, 'reviewRoundId' => $reviewRound->getId())));
         }
     }
     // When this form is being used in review stages, we need a different
     // save operation to allow the EditorDecisionHandler authorize the review
     // round object.
     if ($this->getSaveFormOperation()) {
         $templateMgr = TemplateManager::getManager($request);
         $templateMgr->assign('saveFormOperation', $this->getSaveFormOperation());
     }
     $templateMgr->assign('allowedVariables', $this->_getAllowedVariables($request));
     return parent::fetch($request);
 }
Example #11
0
 /**
  * Constructor.
  * @param $seriesEditorSubmission SeriesEditorSubmission
  */
 function InitiateReviewForm($seriesEditorSubmission)
 {
     parent::EditorDecisionForm($seriesEditorSubmission, 'controllers/modals/editorDecision/form/initiateReviewForm.tpl');
 }
 /**
  * Constructor.
  * @param $submission Submission
  */
 function __construct($submission, $decision, $stageId, $template)
 {
     parent::__construct($submission, $decision, $stageId, $template);
 }