Exemplo n.º 1
0
 /**
  * Display the tabs index page.
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function fetch($args, $request)
 {
     parent::fetch($args, $request);
     $templateMgr = TemplateManager::getManager($request);
     $templateMgr->assign('selectedFormatId', $this->getSelectedFormatId());
     $submission = $this->getSubmission();
     // load in any publication formats assigned to this published monograph
     $publicationFormatDao = DAORegistry::getDAO('PublicationFormatDAO');
     $formats = $publicationFormatDao->getBySubmissionId($submission->getId());
     $publicationFormats = array();
     while ($publicationFormat = $formats->next()) {
         $publicationFormats[] = $publicationFormat;
     }
     $templateMgr->assign_by_ref('publicationFormats', $publicationFormats);
     $application = Application::getApplication();
     $request = $application->getRequest();
     $router = $request->getRouter();
     $dispatcher = $router->getDispatcher();
     // These two URLs are catalog/monograph specific.
     $tabsUrl = $dispatcher->url($request, ROUTE_COMPONENT, null, 'modals.submissionMetadata.CatalogEntryHandler', 'fetchFormatInfo', null, array('submissionId' => $submission->getId(), 'stageId' => $this->getStageId()));
     $templateMgr->assign('tabsUrl', $tabsUrl);
     $tabContentUrl = $dispatcher->url($request, ROUTE_COMPONENT, null, 'tab.catalogEntry.CatalogEntryTabHandler', 'publicationMetadata', null, array('submissionId' => $submission->getId(), 'stageId' => $this->getStageId()));
     $templateMgr->assign('tabContentUrl', $tabContentUrl);
     return $templateMgr->fetchJson('controllers/modals/submissionMetadata/catalogEntryTabs.tpl');
 }
Exemplo n.º 2
0
 /**
  * Display the tabs index page.
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function fetch($args, $request)
 {
     parent::fetch($args, $request);
     $templateMgr = TemplateManager::getManager($request);
     $submission = $this->getSubmission();
     // load in any galley formats assigned to this published article
     $galleyDao = DAORegistry::getDAO('ArticleGalleyDAO');
     $articleGalleys = $galleyDao->getBySubmissionId($submission->getId());
     $templateMgr->assign('galleys', $articleGalleys->toArray());
     $application = Application::getApplication();
     $request = $application->getRequest();
     $router = $request->getRouter();
     $dispatcher = $router->getDispatcher();
     $tabsUrl = $dispatcher->url($request, ROUTE_COMPONENT, null, 'modals.submissionMetadata.IssueEntryHandler', 'fetchFormatInfo', null, array('submissionId' => $submission->getId(), 'stageId' => $this->getStageId()));
     $templateMgr->assign('tabsUrl', $tabsUrl);
     $tabContentUrl = $dispatcher->url($request, ROUTE_COMPONENT, null, 'tab.issueEntry.IssueEntryTabHandler', 'galleyMetadata', null, array('submissionId' => $submission->getId(), 'stageId' => $this->getStageId()));
     $templateMgr->assign('tabContentUrl', $tabContentUrl);
     return $templateMgr->fetchJson('controllers/modals/submissionMetadata/issueEntryTabs.tpl');
 }