Open Journal Systems  3.3.0
WorkflowTabHandler.inc.php
1 <?php
2 
16 // Import the base Handler.
17 import('lib.pkp.controllers.tab.workflow.PKPWorkflowTabHandler');
18 
20 
24  function fetchTab($args, $request) {
25  $this->setupTemplate($request);
26  $templateMgr = TemplateManager::getManager($request);
27  $stageId = $this->getAuthorizedContextObject(ASSOC_TYPE_WORKFLOW_STAGE);
28  $submission = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION);
29  switch ($stageId) {
30  case WORKFLOW_STAGE_ID_PRODUCTION:
31  $dispatcher = $request->getDispatcher();
32  import('lib.pkp.classes.linkAction.request.AjaxModal');
33  $schedulePublicationLinkAction = new LinkAction(
34  'schedulePublication',
35  new AjaxModal(
36  $dispatcher->url(
37  $request, ROUTE_COMPONENT, null,
38  'tab.issueEntry.IssueEntryTabHandler',
39  'publicationMetadata', null,
40  array('submissionId' => $submission->getId(), 'stageId' => $stageId)
41  ),
42  __('submission.publication')
43  ),
44  __('editor.submission.schedulePublication')
45  );
46  $templateMgr->assign('schedulePublicationLinkAction', $schedulePublicationLinkAction);
47  break;
48  }
49  return parent::fetchTab($args, $request);
50  }
51 
57  protected function getProductionNotificationOptions($submissionId) {
58  return array(
59  NOTIFICATION_LEVEL_NORMAL => array(
60  NOTIFICATION_TYPE_VISIT_CATALOG => array(ASSOC_TYPE_SUBMISSION, $submissionId),
61  NOTIFICATION_TYPE_ASSIGN_PRODUCTIONUSER => array(ASSOC_TYPE_SUBMISSION, $submissionId),
62  NOTIFICATION_TYPE_AWAITING_REPRESENTATIONS => array(ASSOC_TYPE_SUBMISSION, $submissionId),
63  ),
64  NOTIFICATION_LEVEL_TRIVIAL => array()
65  );
66  }
67 }
68 
69 
PKPWorkflowTabHandler\setupTemplate
setupTemplate($request)
Definition: PKPWorkflowTabHandler.inc.php:149
PKPWorkflowTabHandler
Handle AJAX operations for workflow tabs.
Definition: PKPWorkflowTabHandler.inc.php:23
WorkflowTabHandler
Handle AJAX operations for workflow tabs.
Definition: WorkflowTabHandler.inc.php:19
WorkflowTabHandler\fetchTab
fetchTab($args, $request)
Definition: WorkflowTabHandler.inc.php:24
AjaxModal
A modal that retrieves its content from via AJAX.
Definition: AjaxModal.inc.php:18
LinkAction
Base class defining an action that can be performed by the user in the user interface.
Definition: LinkAction.inc.php:22
PKPTemplateManager\getManager
static & getManager($request=null)
Definition: PKPTemplateManager.inc.php:1239
PKPHandler\getAuthorizedContextObject
& getAuthorizedContextObject($assocType)
Definition: PKPHandler.inc.php:174
WorkflowTabHandler\getProductionNotificationOptions
getProductionNotificationOptions($submissionId)
Definition: WorkflowTabHandler.inc.php:57