From e8fcbcb41f915c4ae2a4485faa135f025024637d Mon Sep 17 00:00:00 2001 From: "jerico.dev" Date: Sat, 25 Sep 2010 14:15:57 -0300 Subject: [PATCH] *5938* Abstract displays original References List --- classes/article/PublishedArticle.inc.php | 2 +- pages/article/ArticleHandler.inc.php | 10 +++++++++- templates/article/article.tpl | 8 ++++++-- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/classes/article/PublishedArticle.inc.php b/classes/article/PublishedArticle.inc.php index 48d1dd789e4..8d12ad54d7b 100644 --- a/classes/article/PublishedArticle.inc.php +++ b/classes/article/PublishedArticle.inc.php @@ -241,7 +241,7 @@ function getBestArticleId($journal = null) { $publicArticleId = $this->getPublicArticleId(); if (!empty($publicArticleId)) return $publicArticleId; } - return $this->getArticleId(); + return $this->getId(); } /** diff --git a/pages/article/ArticleHandler.inc.php b/pages/article/ArticleHandler.inc.php index 4e293025e9d..4cb3842768f 100644 --- a/pages/article/ArticleHandler.inc.php +++ b/pages/article/ArticleHandler.inc.php @@ -61,7 +61,7 @@ function view($args, &$request) { $journalRt = $rtDao->getJournalRTByJournal($journal); $sectionDao =& DAORegistry::getDAO('SectionDAO'); - $section =& $sectionDao->getSection($article->getSectionId(), $journal->getJournalid(), true); + $section =& $sectionDao->getSection($article->getSectionId(), $journal->getId(), true); $version = null; if ($journalRt->getVersion()!=null && $journalRt->getDefineTerms()) { @@ -146,6 +146,14 @@ function view($args, &$request) { $templateMgr->assign('coverPageAltText', $article->getLocalizedCoverPageAltText()); } + // References list. + // FIXME: We only display the edited raw citations right now. We also want + // to allow for generated citations to be displayed here (including a way for + // the reader to choose any of the installed citation styles for output), see #5938. + $citationDao =& DAORegistry::getDAO('CitationDAO'); /* @var $citationDao CitationDAO */ + $citationFactory =& $citationDao->getObjectsByAssocId(ASSOC_TYPE_ARTICLE, $article->getId()); + $templateMgr->assign('citationFactory', $citationFactory); + // Increment the published article's abstract views count if (!$request->isBot()) { $publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO'); diff --git a/templates/article/article.tpl b/templates/article/article.tpl index 667168a6fe4..b98c5c5d108 100644 --- a/templates/article/article.tpl +++ b/templates/article/article.tpl @@ -82,10 +82,14 @@ {/if} - {if $article->getCitations()} + {if $citationFactory}

{translate key="submission.citations"}


-
{$article->getCitations()|strip_unsafe_html|nl2br}
+
+ {iterate from=citationFactory item=citation} +

{$citation->getRawCitation()|strip_unsafe_html}

+ {/iterate} +

{/if}