/** * @see SubmissionMetadataViewForm::fetch() */ function fetch($request) { $templateMgr = TemplateManager::getManager($request); // Make this available for expedited submissions. $salesTypes = array('openAccess' => 'payment.directSales.openAccess', 'directSales' => 'payment.directSales.directSales', 'notAvailable' => 'payment.directSales.notAvailable'); $templateMgr->assign('salesTypes', $salesTypes); return parent::fetch($request); }
/** * Display the metadata tab. * @param $args array * @param $request PKPRequest * @return JSONMessage JSON object */ function metadata($args, $request) { $this->setupTemplate($request); import('controllers.modals.submissionMetadata.form.SubmissionMetadataViewForm'); // prevent anyone but managers and editors from submitting the catalog entry form $userRoles = $this->getAuthorizedContextObject(ASSOC_TYPE_USER_ROLES); $params = array(); if (!array_intersect(array(ROLE_ID_MANAGER, ROLE_ID_SUB_EDITOR), $userRoles)) { $params['hideSubmit'] = true; $params['readOnly'] = true; } $submissionMetadataViewForm = new SubmissionMetadataViewForm($this->_submission->getId(), null, $params); $submissionMetadataViewForm->initData($args, $request); return new JSONMessage(true, $submissionMetadataViewForm->fetch($request)); }