-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f2de8cb
commit 423cff9
Showing
4 changed files
with
116 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,6 +63,7 @@ | |
text-blue-300 | ||
text-sky-300 | ||
text-orange-300 | ||
dark:bg-gray-800 | ||
"></div> | ||
|
||
|
||
|
71 changes: 71 additions & 0 deletions
71
templates/plugins/generic/pdfJsViewer/templates/display.tpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
{** | ||
* 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} | ||
<script type="text/javascript" src="{$jquery}"></script> | ||
<script type="text/javascript" src="{$jqueryUI}"></script> | ||
</head> | ||
<body class="pkp_page_{$requestedPage|escape} pkp_op_{$requestedOp|escape}"> | ||
|
||
{* Header wrapper *} | ||
<header class="flex justify-between space-x-4 px-2 py-1 text-sm"> | ||
|
||
<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> | ||
</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> |