Hello
We are unable to get acceptance data on the article_detail.tpl
page. Please suggest to me where we can use (page path) suggested code and how to hook the template page.
Please help me.
We use this code at the last in ArticleHandler.inc.php
public function loadTemplateData($hookName, $args) {
// Retrieve the TemplateManager
$templateMgr = $args[0];
$submission = $templateMgr->get_template_vars('citationArgs');
$submissionId = $submission['submissionId'];
$dateAccepted = "";
$editDecisionDao = DAORegistry::getDAO('EditDecisionDAO');
$decisions = $editDecisionDao->getEditorDecisions($submissionId);
foreach ($decisions as $decision) {
if ($decision['stageId'] == '3' && $decision['decision'] == '1')
$dateAccepted = $decision[dateDecided];
}
$templateMgr->assign('acceptanceDate',$dateAccepted);
}
public function init() { HookRegistry::register ('TemplateManager::display', array($this, 'loadTemplateData'));}
and in article_details.tpl
{translate key="submission.accepted"}
</h2>
<div class="value">
<span>{$acceptanceDate|date_format:$dateFormatShort}</span>
</div>