/** * Display the form. */ function display() { $press =& Request::getPress(); $user =& Request::getUser(); $templateMgr =& TemplateManager::getManager(); // Get series for this press $seriesDao =& DAORegistry::getDAO('SeriesDAO'); // FIXME: If this user is a series editor or an editor, they are // allowed to submit to series flagged as "editor-only" for // submissions. Otherwise, display only series they are allowed // to submit to. $roleDao =& DAORegistry::getDAO('RoleDAO'); $isEditor = $roleDao->userHasRole($press->getId(), $user->getId(), ROLE_ID_EDITOR) || $roleDao->userHasRole($press->getId(), $user->getId(), ROLE_ID_SERIES_EDITOR); $seriesOptions = array('0' => Locale::translate('submission.submit.selectSeries')) + $seriesDao->getTitlesByPressId($press->getId()); $templateMgr->assign('seriesOptions', $seriesOptions); // Provide available submission languages. (Convert the array // of locale symbolic names xx_XX into an associative array // of symbolic names => readable names.) $supportedSubmissionLocales = $press->getSetting('supportedSubmissionLocales'); if (empty($supportedSubmissionLocales)) { $supportedSubmissionLocales = array($press->getPrimaryLocale()); } $templateMgr->assign('supportedSubmissionLocaleNames', array_flip(array_intersect(array_flip(Locale::getAllLocales()), $supportedSubmissionLocales))); parent::display(); }
/** * Display the form */ function display($request) { $templateMgr =& TemplateManager::getManager(); $templateMgr->assign('isEditedVolume', $this->monograph->getWorkType() == WORK_TYPE_EDITED_VOLUME); return parent::display($request); }