Loading XML2HTMLPlugin.php +8 −0 Changes for XML2HTMLPlugin.php: 8 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -171,6 +171,7 @@ class XML2HTMLPlugin extends GenericPlugin $templateMgr->assign('text', $html); $templateMgr->assign('cssLandingPageUrl', $this->getCssFileUrl($this->getRequest(), 'cssLandingPageFile')); $templateMgr->assign('cssSideViewUrl', $this->getCssFileUrl($this->getRequest(), 'cssSideViewFile')); $templateMgr->assign('metadataUrl', $this->getMetadataUrl($submissionId, $op)); $templateMgr->display($this->getTemplateResource('HTMLGalleyView.tpl')); } Loading Loading @@ -217,6 +218,13 @@ class XML2HTMLPlugin extends GenericPlugin } private function getMetadataUrl(int $submissionId, string $op): string { $request = $this->getRequest(); $page = $op === 'catalog' ? 'catalog' : 'article'; return $request->url(null, $page, 'view', [$submissionId]); } /** * get HTML file path from its zip one * exemple : a/b/c/1234.zip -> ojs/files/dir/a/b/c/1234/1234.html Loading locale/en/locale.po +3 −0 Changes for locale/en/locale.po: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -37,3 +37,6 @@ msgstr "Settings for" msgid "plugins.generic.xml2html.metadata" msgstr "Metadata's source" msgid "plugins.generic.xml2html.backToMetadata" msgstr "Back to article page" No newline at end of file locale/fr/locale.po +3 −0 Changes for locale/fr/locale.po: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -37,3 +37,6 @@ msgstr "Paramétrage de la revue" msgid "plugins.generic.xml2html.metadata" msgstr "Source des métadonnées" msgid "plugins.generic.xml2html.backToMetadata" msgstr "Retour à la page de l'article" No newline at end of file resources/styles/xml_2_html.css +39 −0 Changes for resources/styles/xml_2_html.css: 39 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -129,6 +129,45 @@ body.dark #moon:hover { background-color: rgba(255, 255, 255, 0.1); } .sideview-back-btn { position: fixed; top: 10px; right: 50px; z-index: 1000; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 1px solid #ccc; color: #333; font-size: 1.25rem; line-height: 1; text-decoration: none; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); } .sideview-back-btn:hover, .sideview-back-btn:focus { background: #f0f0f0; color: #000; } body.dark .sideview-back-btn { background: var(--dark-theme-bg); border-color: var(--dark-border); color: var(--dark-theme-txt); } body.dark .sideview-back-btn:hover, body.dark .sideview-back-btn:focus { background-color: rgba(255, 255, 255, 0.1); color: #fff; } .wrap { padding-top: 42px; min-height: 100vh; Loading templates/HTMLGalleyView.tpl +3 −0 Changes for templates/HTMLGalleyView.tpl: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -21,6 +21,9 @@ {$dcMetas} </head> <body> {if $metadataUrl} <a href="{$metadataUrl}" class="sideview-back-btn" title="{translate key="plugins.generic.xml2html.backToMetadata"}" aria-label="{translate key="plugins.generic.xml2html.backToMetadata"}">✕</a> {/if} <div class="page {if $metadataSource == 'tei'}metadata_tei{else}metadata_pkp{/if}"> {$text} </div> Loading Loading
XML2HTMLPlugin.php +8 −0 Changes for XML2HTMLPlugin.php: 8 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -171,6 +171,7 @@ class XML2HTMLPlugin extends GenericPlugin $templateMgr->assign('text', $html); $templateMgr->assign('cssLandingPageUrl', $this->getCssFileUrl($this->getRequest(), 'cssLandingPageFile')); $templateMgr->assign('cssSideViewUrl', $this->getCssFileUrl($this->getRequest(), 'cssSideViewFile')); $templateMgr->assign('metadataUrl', $this->getMetadataUrl($submissionId, $op)); $templateMgr->display($this->getTemplateResource('HTMLGalleyView.tpl')); } Loading Loading @@ -217,6 +218,13 @@ class XML2HTMLPlugin extends GenericPlugin } private function getMetadataUrl(int $submissionId, string $op): string { $request = $this->getRequest(); $page = $op === 'catalog' ? 'catalog' : 'article'; return $request->url(null, $page, 'view', [$submissionId]); } /** * get HTML file path from its zip one * exemple : a/b/c/1234.zip -> ojs/files/dir/a/b/c/1234/1234.html Loading
locale/en/locale.po +3 −0 Changes for locale/en/locale.po: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -37,3 +37,6 @@ msgstr "Settings for" msgid "plugins.generic.xml2html.metadata" msgstr "Metadata's source" msgid "plugins.generic.xml2html.backToMetadata" msgstr "Back to article page" No newline at end of file
locale/fr/locale.po +3 −0 Changes for locale/fr/locale.po: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -37,3 +37,6 @@ msgstr "Paramétrage de la revue" msgid "plugins.generic.xml2html.metadata" msgstr "Source des métadonnées" msgid "plugins.generic.xml2html.backToMetadata" msgstr "Retour à la page de l'article" No newline at end of file
resources/styles/xml_2_html.css +39 −0 Changes for resources/styles/xml_2_html.css: 39 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -129,6 +129,45 @@ body.dark #moon:hover { background-color: rgba(255, 255, 255, 0.1); } .sideview-back-btn { position: fixed; top: 10px; right: 50px; z-index: 1000; display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 1px solid #ccc; color: #333; font-size: 1.25rem; line-height: 1; text-decoration: none; cursor: pointer; box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); } .sideview-back-btn:hover, .sideview-back-btn:focus { background: #f0f0f0; color: #000; } body.dark .sideview-back-btn { background: var(--dark-theme-bg); border-color: var(--dark-border); color: var(--dark-theme-txt); } body.dark .sideview-back-btn:hover, body.dark .sideview-back-btn:focus { background-color: rgba(255, 255, 255, 0.1); color: #fff; } .wrap { padding-top: 42px; min-height: 100vh; Loading
templates/HTMLGalleyView.tpl +3 −0 Changes for templates/HTMLGalleyView.tpl: 3 added lines, 0 removed lines. Original line number Diff line number Diff line Loading @@ -21,6 +21,9 @@ {$dcMetas} </head> <body> {if $metadataUrl} <a href="{$metadataUrl}" class="sideview-back-btn" title="{translate key="plugins.generic.xml2html.backToMetadata"}" aria-label="{translate key="plugins.generic.xml2html.backToMetadata"}">✕</a> {/if} <div class="page {if $metadataSource == 'tei'}metadata_tei{else}metadata_pkp{/if}"> {$text} </div> Loading