ojs : create Open Review Policy page for public dispaly
In previous post, I described what I did to get a link on the About Page to a page in my plugin containing the Open Review Policy (as generated by the journal admin on the settings page of the plugin).
This post is on creating the Open Review Policy page.
In the OpenReviewHandler.inc.php file, added this function
function openReviewPolicy($args, &$request) {
$router =& $request->getRouter();
$journal =& $router->getContext($request);
$openReviewPlugin =& PluginRegistry::getPlugin('generic', OPENREVIEW_PLUGIN_NAME);
$templateMgr =& TemplateManager::getManager();
$templateMgr->assign('pageHierarchy', array(array($router->url($request, null, 'about'), 'about.aboutTheJournal')));
$templateMgr->assign('openReviewPolicy', $openReviewPlugin->getSetting($journal->getId(), 'openReviewPolicy'));
$templateMgr->display($openReviewPlugin->getTemplatePath() .'/openReviewPolicy.tpl');
}
Obviously the last line tells the TemplateManager instance which smarty template to use (see below). I'm not quite sure what each of the arguments in the second-to-last line does. Also, nowhere in the whole chain does the Locale variable for the actual policy get invoked, but the text appears on the page - that makes no sense to me.
Here's the working script of the openReviewPolicy.tpl file:
{strip}
{assign var="pageTitle" value="plugins.generic.openReview.settings.openReviewPolicyTitle"}
{include file="common/header.tpl"}
{/strip}
{$openReviewPolicy|strip_unsafe_html}