Skip to content

Commit

Permalink
*5938* Abstract displays original References List
Browse files Browse the repository at this point in the history
  • Loading branch information
fgrandel committed Sep 25, 2010
1 parent c117685 commit e8fcbcb
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion classes/article/PublishedArticle.inc.php
Expand Up @@ -241,7 +241,7 @@ function getBestArticleId($journal = null) {
$publicArticleId = $this->getPublicArticleId();
if (!empty($publicArticleId)) return $publicArticleId;
}
return $this->getArticleId();
return $this->getId();
}

/**
Expand Down
10 changes: 9 additions & 1 deletion pages/article/ArticleHandler.inc.php
Expand Up @@ -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()) {
Expand Down Expand Up @@ -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');
Expand Down
8 changes: 6 additions & 2 deletions templates/article/article.tpl
Expand Up @@ -82,10 +82,14 @@
</div>
{/if}
{if $article->getCitations()}
{if $citationFactory}
<h4>{translate key="submission.citations"}</h4>
<br />
<div>{$article->getCitations()|strip_unsafe_html|nl2br}</div>
<div>
{iterate from=citationFactory item=citation}
<p>{$citation->getRawCitation()|strip_unsafe_html}</p>
{/iterate}
</div>
<br />
{/if}
Expand Down

0 comments on commit e8fcbcb

Please sign in to comment.