/** * Fetch and store away objects */ function initialize(&$request, $args = null) { parent::initialize($request, $args); // Fetch the monograph and file to display information about $this->monograph =& $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH); $submissionFileDao =& DAORegistry::getDAO('SubmissionFileDAO'); /* @var $submissionFileDao SubmissionFileDAO */ $this->monographFile =& $submissionFileDao->getLatestRevision($request->getUserVar('fileId')); // Ensure data integrity. assert($this->monograph && $this->monographFile && $this->monograph->getId() == $this->monographFile->getMonographId()); }
/** * Set up the template * @param $request PKPRequest */ function setupTemplate($request) { $templateMgr = TemplateManager::getManager($request); // Get the latest history item to display in the header $submissionEventLogDao = DAORegistry::getDAO('SubmissionFileEventLogDAO'); $fileEvents = $submissionEventLogDao->getByFileId($this->submissionFile->getFileId()); $lastEvent = $fileEvents->next(); if (isset($lastEvent)) { $templateMgr->assign('lastEvent', $lastEvent); // Get the user who created the last event. $userDao = DAORegistry::getDAO('UserDAO'); $user = $userDao->getById($lastEvent->getUserId()); $templateMgr->assign('lastEventUser', $user); } return parent::setupTemplate($request); }
/** * Display the main information center modal. * @param $args array * @param $request PKPRequest */ function viewInformationCenter($args, $request) { // Get the latest history item to display in the header $submissionEventLogDao = DAORegistry::getDAO('SubmissionEventLogDAO'); $submissionEvents = $submissionEventLogDao->getBySubmissionId($this->_submission->getId()); $lastEvent = $submissionEvents->next(); // Assign variables to the template manager and display $templateMgr = TemplateManager::getManager($request); if (isset($lastEvent)) { $templateMgr->assign('lastEvent', $lastEvent); // Get the user who posted the last note $userDao = DAORegistry::getDAO('UserDAO'); $user = $userDao->getById($lastEvent->getUserId()); $templateMgr->assign('lastEventUser', $user); } return parent::viewInformationCenter($args, $request); }
/** * Constructor */ function FileInformationCenterHandler() { parent::InformationCenterHandler(); }
/** * Constructor */ function SubmissionInformationCenterHandler() { parent::InformationCenterHandler(); }
/** * Fetch and store away objects */ function initialize(&$request, $args = null) { parent::initialize($request, $args); // Fetch the monograph to display information about $this->monograph =& $this->getAuthorizedContextObject(ASSOC_TYPE_MONOGRAPH); }