/**
  * Setup common template variables.
  * @param $subclass boolean set to true if caller is below this handler in the hierarchy
  */
 function setupTemplate($subclass = false, $articleId = 0, $parentPage = null)
 {
     $templateMgr =& TemplateManager::getManager();
     $pageHierarchy = $subclass ? array(array(Request::url(null, 'user'), 'navigation.user'), array(Request::url(null, 'author'), 'user.role.author'), array(Request::url(null, 'author'), 'article.submissions')) : array(array(Request::url(null, 'user'), 'navigation.user'), array(Request::url(null, 'author'), 'user.role.author'));
     import('submission.sectionEditor.SectionEditorAction');
     $submissionCrumb = SectionEditorAction::submissionBreadcrumb($articleId, $parentPage, 'author');
     if (isset($submissionCrumb)) {
         $pageHierarchy = array_merge($pageHierarchy, $submissionCrumb);
     }
     $templateMgr->assign('pageHierarchy', $pageHierarchy);
 }
 /**
  * Setup common template variables.
  * @param $subclass boolean set to true if caller is below this handler in the hierarchy
  */
 function setupTemplate($subclass = false, $articleId = 0, $parentPage = null, $showSidebar = true)
 {
     $templateMgr =& TemplateManager::getManager();
     $isEditor = Validation::isEditor();
     if (Request::getRequestedPage() == 'editor') {
         EditorHandler::setupTemplate(EDITOR_SECTION_SUBMISSIONS, $articleId, $parentPage);
         $templateMgr->assign('helpTopicId', 'editorial.editorsRole');
     } else {
         $templateMgr->assign('helpTopicId', 'editorial.sectionEditorsRole');
         $pageHierarchy = $subclass ? array(array(Request::url(null, 'user'), 'navigation.user'), array(Request::url(null, $isEditor ? 'editor' : 'sectionEditor'), $isEditor ? 'user.role.editor' : 'user.role.sectionEditor'), array(Request::url(null, 'sectionEditor'), 'article.submissions')) : array(array(Request::url(null, 'user'), 'navigation.user'), array(Request::url(null, $isEditor ? 'editor' : 'sectionEditor'), $isEditor ? 'user.role.editor' : 'user.role.sectionEditor'));
         import('submission.sectionEditor.SectionEditorAction');
         $submissionCrumb = SectionEditorAction::submissionBreadcrumb($articleId, $parentPage, 'sectionEditor');
         if (isset($submissionCrumb)) {
             $pageHierarchy = array_merge($pageHierarchy, $submissionCrumb);
         }
         $templateMgr->assign('pageHierarchy', $pageHierarchy);
     }
 }
 /**
  * Setup common template variables.
  * @param $subclass boolean set to true if caller is below this handler in the hierarchy
  * @param $articleId int optional
  * @param $parentPage string optional
  * @param $showSidebar boolean optional
  */
 function setupTemplate($subclass = false, $articleId = 0, $parentPage = null, $showSidebar = true)
 {
     parent::setupTemplate();
     AppLocale::requireComponents(LOCALE_COMPONENT_PKP_SUBMISSION, LOCALE_COMPONENT_OJS_EDITOR, LOCALE_COMPONENT_PKP_MANAGER, LOCALE_COMPONENT_OJS_AUTHOR, LOCALE_COMPONENT_OJS_MANAGER);
     $templateMgr =& TemplateManager::getManager();
     $isEditor = Validation::isEditor();
     if (Request::getRequestedPage() == 'editor') {
         $templateMgr->assign('helpTopicId', 'editorial.editorsRole');
     } else {
         $templateMgr->assign('helpTopicId', 'editorial.sectionEditorsRole');
     }
     $roleSymbolic = $isEditor ? 'editor' : 'sectionEditor';
     $roleKey = $isEditor ? 'user.role.editor' : 'user.role.sectionEditor';
     $pageHierarchy = $subclass ? array(array(Request::url(null, 'user'), 'navigation.user'), array(Request::url(null, $roleSymbolic), $roleKey), array(Request::url(null, $roleSymbolic), 'article.submissions')) : array(array(Request::url(null, 'user'), 'navigation.user'), array(Request::url(null, $roleSymbolic), $roleKey));
     import('classes.submission.sectionEditor.SectionEditorAction');
     $submissionCrumb = SectionEditorAction::submissionBreadcrumb($articleId, $parentPage, $roleSymbolic);
     if (isset($submissionCrumb)) {
         $pageHierarchy = array_merge($pageHierarchy, $submissionCrumb);
     }
     $templateMgr->assign('pageHierarchy', $pageHierarchy);
 }
 /**
  * Setup common template variables.
  * @param $subclass boolean set to true if caller is below this handler in the hierarchy
  */
 function setupTemplate($subclass = false, $articleId = 0, $parentPage = null)
 {
     parent::setupTemplate();
     AppLocale::requireComponents(array(LOCALE_COMPONENT_PKP_SUBMISSION));
     $templateMgr =& TemplateManager::getManager();
     $pageHierarchy = $subclass ? array(array(Request::url(null, 'user'), 'navigation.user'), array(Request::url(null, 'copyeditor'), 'user.role.copyeditor')) : array(array('user', 'navigation.user'), array('copyeditor', 'user.role.copyeditor'));
     import('classes.submission.sectionEditor.SectionEditorAction');
     $submissionCrumb = SectionEditorAction::submissionBreadcrumb($articleId, $parentPage, 'copyeditor');
     if (isset($submissionCrumb)) {
         $pageHierarchy = array_merge($pageHierarchy, $submissionCrumb);
     }
     $templateMgr->assign('pageHierarchy', $pageHierarchy);
 }
Esempio n. 5
0
 /**
  * Setup common template variables.
  * @param $level int set to 0 if caller is at the same level as this handler in the hierarchy; otherwise the number of levels below this handler
  */
 function setupTemplate($level = EDITOR_SECTION_HOME, $articleId = 0, $parentPage = null)
 {
     parent::setupTemplate();
     // Layout Editors have access to some Issue Mgmt functions. Make sure we give them
     // the appropriate breadcrumbs and sidebar.
     $isLayoutEditor = Request::getRequestedPage() == 'layoutEditor';
     $journal =& Request::getJournal();
     $templateMgr =& TemplateManager::getManager();
     if ($level == EDITOR_SECTION_HOME) {
         $pageHierarchy = array(array(Request::url(null, 'user'), 'navigation.user'));
     } else {
         if ($level == EDITOR_SECTION_SUBMISSIONS) {
             $pageHierarchy = array(array(Request::url(null, 'user'), 'navigation.user'), array(Request::url(null, 'editor'), 'user.role.editor'), array(Request::url(null, 'editor', 'submissions'), 'article.submissions'));
         } else {
             if ($level == EDITOR_SECTION_ISSUES) {
                 $pageHierarchy = array(array(Request::url(null, 'user'), 'navigation.user'), array(Request::url(null, $isLayoutEditor ? 'layoutEditor' : 'editor'), $isLayoutEditor ? 'user.role.layoutEditor' : 'user.role.editor'), array(Request::url(null, $isLayoutEditor ? 'layoutEditor' : 'editor', 'futureIssues'), 'issue.issues'));
             }
         }
     }
     import('classes.submission.sectionEditor.SectionEditorAction');
     $submissionCrumb = SectionEditorAction::submissionBreadcrumb($articleId, $parentPage, 'editor');
     if (isset($submissionCrumb)) {
         $pageHierarchy = array_merge($pageHierarchy, $submissionCrumb);
     }
     $templateMgr->assign('pageHierarchy', $pageHierarchy);
 }