/**
  * Fetch the form.
  */
 function fetch($request)
 {
     $templateMgr = TemplateManager::getManager($request);
     // Get section for this context
     $sectionDao = DAORegistry::getDAO('SectionDAO');
     $sectionOptions = array('0' => __('submission.submit.selectSection')) + $sectionDao->getSectionTitles($this->context->getId());
     $templateMgr->assign('sectionOptions', $sectionOptions);
     return parent::fetch($request);
 }
Exemplo n.º 2
0
 /**
  * Fetch the form.
  */
 function fetch($request)
 {
     $roleDao = DAORegistry::getDAO('RoleDAO');
     $user = $request->getUser();
     $canSubmitAll = $roleDao->userHasRole($this->context->getId(), $user->getId(), ROLE_ID_MANAGER) || $roleDao->userHasRole($this->context->getId(), $user->getId(), ROLE_ID_SUB_EDITOR);
     // Get section options for this context
     $sectionDao = DAORegistry::getDAO('SectionDAO');
     $sectionOptions = array('0' => '') + $sectionDao->getTitles($this->context->getId(), !$canSubmitAll);
     $templateMgr = TemplateManager::getManager($request);
     $templateMgr->assign('sectionOptions', $sectionOptions);
     return parent::fetch($request);
 }