xavi
June 28, 2019, 9:13am
1
Hi,
I created a new item menu on sidebar with link to all my journals on Backend
I would like all the journals on template because we don’t use the “navigationContextMenu”
The new template not depends of any theme,
How can do it ?
Where is the best way to create this template ?
Regards,
xavi
xavi
July 8, 2019, 11:46am
2
Hi,
I created a new item on my sidebar (Backofice) on header.tpl (lib/pkp)
I created a new templates on directory: _templates/management/settings/allMyJournals.tpl
I modified /pages/management/SettingsHandler.inc.php and create a new function:
$this->addRoleAssignment(
array(ROLE_ID_MANAGER,ROLE_ID_SITE_ADMIN,ROLE_ID_SUB_EDITOR,ROLE_ID_AUTHOR,ROLE_ID_REVIEWER,ROLE_ID_ASSISTANT,ROLE_ID_READER,ROLE_ID_SUBSCRIPTION_MANAGER),
array(
'allJournals',
)
);
My function
function allJournals($args, $request) {
$journalDao =& DAORegistry::getDAO('JournalDAO');
$templateMgr = TemplateManager::getManager($request);
$user =& $request->getUser();
$journals = $journalDao-> getAllJournals($user->getId());
$templateMgr->assign('journals', $journals);
$this->setupTemplate($request);
$templateMgr->display('management/settings/allJournals.tpl');
}
How can I to permit for all user registrated show my templates in backoffice ??
Thanks
Xavi.
Did you solve this? How is this link different than the journal navigation drop-down in the upper left?
xavi
July 18, 2019, 6:21am
4
Hi @ctgraham ,
I customized some files from my theme and core.
classes/journal/JournalDAO.inc.php → to create a new function
/lib/pkp/templates/common/header.tpl → to create a new link
/pages/management/SettingsHandler.inc.php → create case and assign roles and new function
/templates/management/settings/allJournals.tpl → my new template with journals
I customized this files becaouse I need to show a list of journals when user has any role.
this link go to submission about this journal.
I have more than 200 journals, so I preferd a list on template.
Regards.
xavi
Ok. This functionality sounds very similar to the intended function of the journal navigation, but in a page instead of a menu.
Is everything working for you now, or did you still need assistance with anything?
xavi
July 18, 2019, 12:34pm
6
Hi @ctgraham ,
I am ok with this new feature, thanks.
Regards,
xavi