first commit
This commit is contained in:
@@ -0,0 +1,72 @@
|
||||
{**
|
||||
* plugins/generic/pdfJsViewer/templates/display.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2020 Simon Fraser University
|
||||
* Copyright (c) 2003-2020 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* Embedded viewing of a PDF galley.
|
||||
*}
|
||||
<!DOCTYPE html>
|
||||
<html lang="{$currentLocale|replace:"_":"-"}" xml:lang="{$currentLocale|replace:"_":"-"}">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset={$defaultCharset|escape}" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>{translate key="article.pageTitle" title=$title|escape}</title>
|
||||
|
||||
{load_header context="frontend" headers=$headers}
|
||||
{load_stylesheet context="frontend" stylesheets=$stylesheets}
|
||||
{load_script context="frontend" scripts=$scripts}
|
||||
</head>
|
||||
<body class="pkp_page_{$requestedPage|escape} pkp_op_{$requestedOp|escape}">
|
||||
|
||||
{* Header wrapper *}
|
||||
<header class="header_view">
|
||||
|
||||
<a href="{$parentUrl}" class="return">
|
||||
<span class="pkp_screen_reader">
|
||||
{if $parent instanceOf Issue}
|
||||
{translate key="issue.return"}
|
||||
{else}
|
||||
{translate key="article.return"}
|
||||
{/if}
|
||||
</span>
|
||||
</a>
|
||||
|
||||
<a href="{$parentUrl}" class="title">
|
||||
{$title|escape}
|
||||
</a>
|
||||
|
||||
<a href="{$pdfUrl}" class="download" download>
|
||||
<span class="label">
|
||||
{translate key="common.download"}
|
||||
</span>
|
||||
<span class="pkp_screen_reader">
|
||||
{translate key="common.downloadPdf"}
|
||||
</span>
|
||||
</a>
|
||||
|
||||
</header>
|
||||
|
||||
<script type="text/javascript">
|
||||
// Creating iframe's src in JS instead of Smarty so that EZProxy-using sites can find our domain in $pdfUrl and do their rewrites on it.
|
||||
$(document).ready(function() {ldelim}
|
||||
var urlBase = "{$pluginUrl}/pdf.js/web/viewer.html?file=";
|
||||
var pdfUrl = {$pdfUrl|json_encode:JSON_UNESCAPED_SLASHES};
|
||||
$("#pdfCanvasContainer > iframe").attr("src", urlBase + encodeURIComponent(pdfUrl));
|
||||
{rdelim});
|
||||
</script>
|
||||
|
||||
<div id="pdfCanvasContainer" class="galley_view{if !$isLatestPublication} galley_view_with_notice{/if}">
|
||||
{if !$isLatestPublication}
|
||||
<div class="galley_view_notice">
|
||||
<div class="galley_view_notice_message" role="alert">
|
||||
{$datePublished}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
<iframe src="" width="100%" height="100%" style="min-height: 500px;" title="{$galleyTitle}" allowfullscreen webkitallowfullscreen></iframe>
|
||||
</div>
|
||||
{call_hook name="Templates::Common::Footer::PageFooter"}
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,14 @@
|
||||
{**
|
||||
* plugins/generic/pdfJsViewer/templates/issueGalley.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2020 Simon Fraser University
|
||||
* Copyright (c) 2003-2020 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* Embedded viewing of a PDF galley.
|
||||
*}
|
||||
{capture assign="pdfUrl"}{url op="download" path=$issue->getBestIssueId($currentJournal)|to_array:$galley->getBestGalleyId($currentJournal) escape=false}{/capture}
|
||||
{capture assign="parentUrl"}{url page="issue" op="view" path=$issue->getBestIssueId($currentJournal)}{/capture}
|
||||
{capture assign="galleyTitle"}{translate key="submission.representationOfTitle" representation=$galley->getLabel() title=$issue->getIssueIdentification()|escape}{/capture}
|
||||
{capture assign="datePublished"}{translate key="submission.outdatedVersion" datePublished=$issue->getData('datePublished')|date_format:$dateFormatLong urlRecentVersion=$parentUrl}{/capture}
|
||||
{include file=$displayTemplateResource title=$issue->getIssueIdentification() parentUrl=$parentUrl pdfUrl=$pdfUrl galleyTitle=$galleyTitle datePublished=$datePublished}
|
||||
@@ -0,0 +1,20 @@
|
||||
{**
|
||||
* plugins/generic/pdfJsViewer/templates/submissionGalley.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2020 Simon Fraser University
|
||||
* Copyright (c) 2003-2020 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* Embedded viewing of a PDF galley.
|
||||
*}
|
||||
{capture assign="pdfUrl"}{strip}
|
||||
{if $isLatestPublication}
|
||||
{url op="download" path=$bestId|to_array:$galley->getBestGalleyId($currentJournal):$galleyFile->getId() escape=false}
|
||||
{else}
|
||||
{url op="download" path=$bestId|to_array:'version':$galleyPublication->getId():$galley->getBestGalleyId($currentJournal):$galleyFile->getId() escape=false}
|
||||
{/if}
|
||||
{/strip}{/capture}
|
||||
{capture assign="parentUrl"}{url page=$submissionNoun op="view" path=$bestId}{/capture}
|
||||
{capture assign="galleyTitle"}{translate key="submission.representationOfTitle" representation=$galley->getLabel() title=$publication->getLocalizedFullTitle()|escape}{/capture}
|
||||
{capture assign="datePublished"}{translate key="submission.outdatedVersion" datePublished=$galleyPublication->getData('datePublished')|date_format:$dateFormatLong urlRecentVersion=$parentUrl}{/capture}
|
||||
{include file=$displayTemplateResource title=$submission->getLocalizedTitle() parentUrl=$parentUrl pdfUrl=$pdfUrl galleyTitle=$galleyTitle datePublished=$datePublished}
|
||||
Reference in New Issue
Block a user