Esempio n. 1
0
 /**
  * View Paper.
  * @param $args array
  * @param $request Request
  */
 function view($args, &$request)
 {
     $router =& $request->getRouter();
     $paperId = isset($args[0]) ? $args[0] : 0;
     $galleyId = isset($args[1]) ? (int) $args[1] : 0;
     $this->validate($request, $paperId, $galleyId);
     $conference =& $router->getContext($request, CONTEXT_CONFERENCE);
     $paper =& $this->paper;
     $this->setupTemplate($request);
     $rtDao = DAORegistry::getDAO('RTDAO');
     $conferenceRt = $rtDao->getConferenceRTByConference($conference);
     $galleyDao = DAORegistry::getDAO('PaperGalleyDAO');
     $galley =& $galleyDao->getGalley($galleyId, $paper->getId());
     if (!$conferenceRt->getEnabled()) {
         if (!$galley || $galley->isHtmlGalley()) {
             return PaperHandler::viewPaper($args, $request);
         } else {
             if ($galley->isPdfGalley()) {
                 return PaperHandler::viewPDFInterstitial($args, $request, $galley);
             } else {
                 return PaperHandler::viewDownloadInterstitial($args, $request, $galley);
             }
         }
     }
     if (!$paper) {
         $request->redirect(null, null, null, $router->getRequestedPage($request));
         return;
     }
     $templateMgr =& TemplateManager::getManager($request);
     $templateMgr->assign('paperId', $paperId);
     $templateMgr->assign_by_ref('paper', $paper);
     $templateMgr->assign('galleyId', $galleyId);
     $templateMgr->assign_by_ref('galley', $galley);
     $templateMgr->display('paper/view.tpl');
 }
Esempio n. 2
0
 /**
  * Constructor
  * @param $request Request
  */
 function RTHandler(&$request)
 {
     parent::PaperHandler($request);
 }