File tree Expand file tree Collapse file tree 2 files changed +9
-11
lines changed
templates/frontend/objects Expand file tree Collapse file tree 2 files changed +9
-11
lines changed Original file line number Diff line number Diff line change 25
25
use APP \security \authorization \OpsServerMustPublishPolicy ;
26
26
use APP \template \TemplateManager ;
27
27
use Firebase \JWT \JWT ;
28
- use PKP \citation \CitationDAO ;
29
28
use PKP \config \Config ;
30
29
use PKP \core \Core ;
31
30
use PKP \core \PKPApplication ;
@@ -268,11 +267,10 @@ public function view($args, $request)
268
267
]);
269
268
270
269
// Citations
271
- if ($ publication ->getData ('citationsRaw ' )) {
272
- $ citationDao = DAORegistry::getDAO ('CitationDAO ' ); /** @var CitationDAO $citationDao */
273
- $ parsedCitations = $ citationDao ->getByPublicationId ($ publication ->getId ());
270
+ if ($ publication ->getData ('citations ' ) || $ publication ->getData ('rawCitations ' )) {
274
271
$ templateMgr ->assign ([
275
- 'parsedCitations ' => $ parsedCitations ->toArray (),
272
+ 'citations ' => $ publication ->getData ('citations ' ),
273
+ 'rawCitations ' => $ publication ->getData ('rawCitations ' )
276
274
]);
277
275
}
278
276
Original file line number Diff line number Diff line change 47
47
* plugins using the hooks provided:
48
48
*
49
49
* @hook Templates::Preprint::Main []
50
- * @hook Templates::Preprint::Details::Reference [[parsedCitation] ]
50
+ * @hook Templates::Preprint::Details::Reference []
51
51
* @hook Templates::Preprint::Details []
52
52
*
53
53
* @uses $preprint Preprint This preprint
255
255
{ /if }
256
256
257
257
{ * References *}
258
- { if $parsedCitations || $publication -> getData ( ' citationsRaw ' ) }
258
+ { if $citations || $rawCitations }
259
259
<section class =" item references" >
260
260
<h2 class =" label" >
261
261
{ translate key= " submission.citations" }
262
262
</h2 >
263
263
<div class =" value" >
264
- { if $parsedCitations }
265
- { foreach from= $parsedCitations item= " parsedCitation " }
266
- <p >{ $parsedCitation -> getCitationWithLinks ()|strip _unsafe_html} { call_hook name= " Templates::Preprint::Details::Reference" citation= $parsedCitation } </p >
264
+ { if $citations }
265
+ { foreach from= $citations item= " citation " }
266
+ <p >{ $citation -> getRawCitationWithLinks ()|strip _unsafe_html} { call_hook name= " Templates::Preprint::Details::Reference" citation= $citation } </p >
267
267
{ /foreach }
268
268
{ else }
269
- { $publication -> getData ( ' citationsRaw ' ) |escape|nl2br }
269
+ { $rawCitations |escape|nl2br }
270
270
{ /if }
271
271
</div >
272
272
</section >
You can’t perform that action at this time.
0 commit comments