first commit
This commit is contained in:
@@ -0,0 +1,459 @@
|
||||
{**
|
||||
* templates/frontend/objects/article_details.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2021 Simon Fraser University
|
||||
* Copyright (c) 2003-2021 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* @brief View of an Article which displays all details about the article.
|
||||
* Expected to be primary object on the page.
|
||||
*
|
||||
* Many journals will want to add custom data to this object, either through
|
||||
* plugins which attach to hooks on the page or by editing the template
|
||||
* themselves. In order to facilitate this, a flexible layout markup pattern has
|
||||
* been implemented. If followed, plugins and other content can provide markup
|
||||
* in a way that will render consistently with other items on the page. This
|
||||
* pattern is used in the .main_entry column and the .entry_details column. It
|
||||
* consists of the following:
|
||||
*
|
||||
* <!-- Wrapper class which provides proper spacing between components -->
|
||||
* <div class="item">
|
||||
* <!-- Title/value combination -->
|
||||
* <div class="label">Abstract</div>
|
||||
* <div class="value">Value</div>
|
||||
* </div>
|
||||
*
|
||||
* All styling should be applied by class name, so that titles may use heading
|
||||
* elements (eg, <h3>) or any element required.
|
||||
*
|
||||
* <!-- Example: component with multiple title/value combinations -->
|
||||
* <div class="item">
|
||||
* <div class="sub_item">
|
||||
* <div class="label">DOI</div>
|
||||
* <div class="value">12345678</div>
|
||||
* </div>
|
||||
* <div class="sub_item">
|
||||
* <div class="label">Published Date</div>
|
||||
* <div class="value">2015-01-01</div>
|
||||
* </div>
|
||||
* </div>
|
||||
*
|
||||
* <!-- Example: component with no title -->
|
||||
* <div class="item">
|
||||
* <div class="value">Whatever you'd like</div>
|
||||
* </div>
|
||||
*
|
||||
* Core components are produced manually below, but can also be added via
|
||||
* plugins using the hooks provided:
|
||||
*
|
||||
* Templates::Article::Main
|
||||
* Templates::Article::Details
|
||||
*
|
||||
* @uses $article Submission This article
|
||||
* @uses $publication Publication The publication being displayed
|
||||
* @uses $firstPublication Publication The first published version of this article
|
||||
* @uses $currentPublication Publication The most recently published version of this article
|
||||
* @uses $issue Issue The issue this article is assigned to
|
||||
* @uses $section Section The journal section this article is assigned to
|
||||
* @uses $categories Category The category this article is assigned to
|
||||
* @uses $primaryGalleys array List of article galleys that are not supplementary or dependent
|
||||
* @uses $supplementaryGalleys array List of article galleys that are supplementary
|
||||
* @uses $keywords array List of keywords assigned to this article
|
||||
* @uses $pubIdPlugins Array of pubId plugins which this article may be assigned
|
||||
* @uses $licenseTerms string License terms.
|
||||
* @uses $licenseUrl string URL to license. Only assigned if license should be
|
||||
* included with published submissions.
|
||||
* @uses $ccLicenseBadge string An image and text with details about the license
|
||||
*}
|
||||
{if !$heading}
|
||||
{assign var="heading" value="h3"}
|
||||
{/if}
|
||||
<article class="obj_article_details">
|
||||
|
||||
{* Indicate if this is only a preview *}
|
||||
{if $publication->getData('status') !== \PKP\submission\PKPSubmission::STATUS_PUBLISHED}
|
||||
<div class="cmp_notification notice">
|
||||
{capture assign="submissionUrl"}{url page="workflow" op="access" path=$article->getId()}{/capture}
|
||||
{translate key="submission.viewingPreview" url=$submissionUrl}
|
||||
</div>
|
||||
{* Notification that this is an old version *}
|
||||
{elseif $currentPublication->getId() !== $publication->getId()}
|
||||
<div class="cmp_notification notice">
|
||||
{capture assign="latestVersionUrl"}{url page="article" op="view" path=$article->getBestId()}{/capture}
|
||||
{translate key="submission.outdatedVersion"
|
||||
datePublished=$publication->getData('datePublished')|date_format:$dateFormatShort
|
||||
urlRecentVersion=$latestVersionUrl|escape
|
||||
}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<h1 class="page_title">
|
||||
{$publication->getLocalizedTitle(null, 'html')|strip_unsafe_html}
|
||||
</h1>
|
||||
|
||||
{if $publication->getLocalizedData('subtitle')}
|
||||
<h2 class="subtitle">
|
||||
{$publication->getLocalizedSubTitle(null, 'html')|strip_unsafe_html}
|
||||
</h2>
|
||||
{/if}
|
||||
|
||||
<div class="row">
|
||||
<div class="main_entry">
|
||||
|
||||
{if $publication->getData('authors')}
|
||||
<section class="item authors">
|
||||
<h2 class="pkp_screen_reader">{translate key="article.authors"}</h2>
|
||||
<ul class="authors">
|
||||
{foreach from=$publication->getData('authors') item=author}
|
||||
<li>
|
||||
<span class="name">
|
||||
{$author->getFullName()|escape}
|
||||
</span>
|
||||
{if $author->getLocalizedData('affiliation')}
|
||||
<span class="affiliation">
|
||||
{$author->getLocalizedData('affiliation')|escape}
|
||||
{if $author->getData('rorId')}
|
||||
<a href="{$author->getData('rorId')|escape}">{$rorIdIcon}</a>
|
||||
{/if}
|
||||
</span>
|
||||
{/if}
|
||||
{assign var=authorUserGroup value=$userGroupsById[$author->getData('userGroupId')]}
|
||||
{if $authorUserGroup->getShowTitle()}
|
||||
<span class="userGroup">
|
||||
{$authorUserGroup->getLocalizedName()|escape}
|
||||
</span>
|
||||
{/if}
|
||||
{if $author->getData('orcid')}
|
||||
<span class="orcid">
|
||||
{if $author->getData('orcidAccessToken')}
|
||||
{$orcidIcon}
|
||||
{/if}
|
||||
<a href="{$author->getData('orcid')|escape}" target="_blank">
|
||||
{$author->getData('orcid')|escape}
|
||||
</a>
|
||||
</span>
|
||||
{/if}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
{* DOI *}
|
||||
{assign var=doiObject value=$article->getCurrentPublication()->getData('doiObject')}
|
||||
{if $doiObject}
|
||||
{assign var="doiUrl" value=$doiObject->getData('resolvingUrl')|escape}
|
||||
<section class="item doi">
|
||||
<h2 class="label">
|
||||
{capture assign=translatedDOI}{translate key="doi.readerDisplayName"}{/capture}
|
||||
{translate key="semicolon" label=$translatedDOI}
|
||||
</h2>
|
||||
<span class="value">
|
||||
<a href="{$doiUrl}">
|
||||
{$doiUrl}
|
||||
</a>
|
||||
</span>
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
|
||||
{* Keywords *}
|
||||
{if !empty($publication->getLocalizedData('keywords'))}
|
||||
<section class="item keywords">
|
||||
<h2 class="label">
|
||||
{capture assign=translatedKeywords}{translate key="article.subject"}{/capture}
|
||||
{translate key="semicolon" label=$translatedKeywords}
|
||||
</h2>
|
||||
<span class="value">
|
||||
{foreach name="keywords" from=$publication->getLocalizedData('keywords') item="keyword"}
|
||||
{$keyword|escape}{if !$smarty.foreach.keywords.last}{translate key="common.commaListSeparator"}{/if}
|
||||
{/foreach}
|
||||
</span>
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
{* Abstract *}
|
||||
{if $publication->getLocalizedData('abstract')}
|
||||
<section class="item abstract">
|
||||
<h2 class="label">{translate key="article.abstract"}</h2>
|
||||
{$publication->getLocalizedData('abstract')|strip_unsafe_html}
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
{call_hook name="Templates::Article::Main"}
|
||||
|
||||
{* Usage statistics chart*}
|
||||
{if $activeTheme->getOption('displayStats') != 'none'}
|
||||
{$activeTheme->displayUsageStatsGraph($article->getId())}
|
||||
<section class="item downloads_chart">
|
||||
<h2 class="label">
|
||||
{translate key="plugins.themes.default.displayStats.downloads"}
|
||||
</h2>
|
||||
<div class="value">
|
||||
<canvas class="usageStatsGraph" data-object-type="Submission" data-object-id="{$article->getId()|escape}"></canvas>
|
||||
<div class="usageStatsUnavailable" data-object-type="Submission" data-object-id="{$article->getId()|escape}">
|
||||
{translate key="plugins.themes.default.displayStats.noStats"}
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
{* Author biographies *}
|
||||
{assign var="hasBiographies" value=0}
|
||||
{foreach from=$publication->getData('authors') item=author}
|
||||
{if $author->getLocalizedData('biography')}
|
||||
{assign var="hasBiographies" value=$hasBiographies+1}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{if $hasBiographies}
|
||||
<section class="item author_bios">
|
||||
<h2 class="label">
|
||||
{if $hasBiographies > 1}
|
||||
{translate key="submission.authorBiographies"}
|
||||
{else}
|
||||
{translate key="submission.authorBiography"}
|
||||
{/if}
|
||||
</h2>
|
||||
<ul class="authors">
|
||||
{foreach from=$publication->getData('authors') item=author}
|
||||
{if $author->getLocalizedData('biography')}
|
||||
<li class="sub_item">
|
||||
<div class="label">
|
||||
{if $author->getLocalizedData('affiliation')}
|
||||
{capture assign="authorName"}{$author->getFullName()|escape}{/capture}
|
||||
{capture assign="authorAffiliation"} {$author->getLocalizedData('affiliation')|escape} {/capture}
|
||||
{translate key="submission.authorWithAffiliation" name=$authorName affiliation=$authorAffiliation}
|
||||
{else}
|
||||
{$author->getFullName()|escape}
|
||||
{/if}
|
||||
</div>
|
||||
<div class="value">
|
||||
{$author->getLocalizedData('biography')|strip_unsafe_html}
|
||||
</div>
|
||||
</li>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
{* References *}
|
||||
{if $parsedCitations || $publication->getData('citationsRaw')}
|
||||
<section class="item references">
|
||||
<h2 class="label">
|
||||
{translate key="submission.citations"}
|
||||
</h2>
|
||||
<div class="value">
|
||||
{if $parsedCitations}
|
||||
{foreach from=$parsedCitations item="parsedCitation"}
|
||||
<p>{$parsedCitation->getCitationWithLinks()|strip_unsafe_html} {call_hook name="Templates::Article::Details::Reference" citation=$parsedCitation}</p>
|
||||
{/foreach}
|
||||
{else}
|
||||
{$publication->getData('citationsRaw')|escape|nl2br}
|
||||
{/if}
|
||||
</div>
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
</div><!-- .main_entry -->
|
||||
|
||||
<div class="entry_details">
|
||||
|
||||
{* Article/Issue cover image *}
|
||||
{if $publication->getLocalizedData('coverImage') || ($issue && $issue->getLocalizedCoverImage())}
|
||||
<div class="item cover_image">
|
||||
<div class="sub_item">
|
||||
{if $publication->getLocalizedData('coverImage')}
|
||||
{assign var="coverImage" value=$publication->getLocalizedData('coverImage')}
|
||||
<img
|
||||
src="{$publication->getLocalizedCoverImageUrl($article->getData('contextId'))|escape}"
|
||||
alt="{$coverImage.altText|escape|default:''}"
|
||||
>
|
||||
{else}
|
||||
<a href="{url page="issue" op="view" path=$issue->getBestIssueId()}">
|
||||
<img src="{$issue->getLocalizedCoverImageUrl()|escape}" alt="{$issue->getLocalizedCoverImageAltText()|escape|default:''}">
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{* Article Galleys *}
|
||||
{if $primaryGalleys}
|
||||
<div class="item galleys">
|
||||
<h2 class="pkp_screen_reader">
|
||||
{translate key="submission.downloads"}
|
||||
</h2>
|
||||
<ul class="value galleys_links">
|
||||
{foreach from=$primaryGalleys item=galley}
|
||||
<li>
|
||||
{include file="frontend/objects/galley_link.tpl" parent=$article publication=$publication galley=$galley purchaseFee=$currentJournal->getData('purchaseArticleFee') purchaseCurrency=$currentJournal->getData('currency')}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
{if $supplementaryGalleys}
|
||||
<div class="item galleys">
|
||||
<h3 class="pkp_screen_reader">
|
||||
{translate key="submission.additionalFiles"}
|
||||
</h3>
|
||||
<ul class="value supplementary_galleys_links">
|
||||
{foreach from=$supplementaryGalleys item=galley}
|
||||
<li>
|
||||
{include file="frontend/objects/galley_link.tpl" parent=$article publication=$publication galley=$galley isSupplementary="1"}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $publication->getData('datePublished')}
|
||||
<div class="item published">
|
||||
<section class="sub_item">
|
||||
<h2 class="label">
|
||||
{translate key="submissions.published"}
|
||||
</h2>
|
||||
<div class="value">
|
||||
{* If this is the original version *}
|
||||
{if $firstPublication->getId() === $publication->getId()}
|
||||
<span>{$firstPublication->getData('datePublished')|date_format:$dateFormatShort}</span>
|
||||
{* If this is an updated version *}
|
||||
{else}
|
||||
<span>{translate key="submission.updatedOn" datePublished=$firstPublication->getData('datePublished')|date_format:$dateFormatShort dateUpdated=$publication->getData('datePublished')|date_format:$dateFormatShort}</span>
|
||||
{/if}
|
||||
</div>
|
||||
</section>
|
||||
{if count($article->getPublishedPublications()) > 1}
|
||||
<section class="sub_item versions">
|
||||
<h2 class="label">
|
||||
{translate key="submission.versions"}
|
||||
</h2>
|
||||
<ul class="value">
|
||||
{foreach from=array_reverse($article->getPublishedPublications()) item=iPublication}
|
||||
{capture assign="name"}{translate key="submission.versionIdentity" datePublished=$iPublication->getData('datePublished')|date_format:$dateFormatShort version=$iPublication->getData('version')}{/capture}
|
||||
<li>
|
||||
{if $iPublication->getId() === $publication->getId()}
|
||||
{$name}
|
||||
{elseif $iPublication->getId() === $currentPublication->getId()}
|
||||
<a href="{url page="article" op="view" path=$article->getBestId()}">{$name}</a>
|
||||
{else}
|
||||
<a href="{url page="article" op="view" path=$article->getBestId()|to_array:"version":$iPublication->getId()}">{$name}</a>
|
||||
{/if}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</section>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{* Data Availability Statement *}
|
||||
{if $publication->getLocalizedData('dataAvailability')}
|
||||
<section class="item dataAvailability">
|
||||
<h2 class="label">{translate key="submission.dataAvailability"}</h2>
|
||||
{$publication->getLocalizedData('dataAvailability')|strip_unsafe_html}
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
{* Issue article appears in *}
|
||||
{if $issue || $section || $categories}
|
||||
<div class="item issue">
|
||||
|
||||
{if $issue}
|
||||
<section class="sub_item">
|
||||
<h2 class="label">
|
||||
{translate key="issue.issue"}
|
||||
</h2>
|
||||
<div class="value">
|
||||
<a class="title" href="{url page="issue" op="view" path=$issue->getBestIssueId()}">
|
||||
{$issue->getIssueIdentification()}
|
||||
</a>
|
||||
</div>
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
{if $section}
|
||||
<section class="sub_item">
|
||||
<h2 class="label">
|
||||
{translate key="section.section"}
|
||||
</h2>
|
||||
<div class="value">
|
||||
{$section->getLocalizedTitle()|escape}
|
||||
</div>
|
||||
</section>
|
||||
{/if}
|
||||
|
||||
{if $categories}
|
||||
<section class="sub_item">
|
||||
<h2 class="label">
|
||||
{translate key="category.category"}
|
||||
</h2>
|
||||
<div class="value">
|
||||
<ul class="categories">
|
||||
{foreach from=$categories item=category}
|
||||
<li><a href="{url router=\PKP\core\PKPApplication::ROUTE_PAGE page="catalog" op="category" path=$category->getPath()|escape}">{$category->getLocalizedTitle()|escape}</a></li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
</section>
|
||||
{/if}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{* PubIds (requires plugins) *}
|
||||
{foreach from=$pubIdPlugins item=pubIdPlugin}
|
||||
{if $pubIdPlugin->getPubIdType() == 'doi'}
|
||||
{continue}
|
||||
{/if}
|
||||
{assign var=pubId value=$article->getStoredPubId($pubIdPlugin->getPubIdType())}
|
||||
{if $pubId}
|
||||
<section class="item pubid">
|
||||
<h2 class="label">
|
||||
{$pubIdPlugin->getPubIdDisplayType()|escape}
|
||||
</h2>
|
||||
<div class="value">
|
||||
{if $pubIdPlugin->getResolvingURL($currentJournal->getId(), $pubId)|escape}
|
||||
<a id="pub-id::{$pubIdPlugin->getPubIdType()|escape}" href="{$pubIdPlugin->getResolvingURL($currentJournal->getId(), $pubId)|escape}">
|
||||
{$pubIdPlugin->getResolvingURL($currentJournal->getId(), $pubId)|escape}
|
||||
</a>
|
||||
{else}
|
||||
{$pubId|escape}
|
||||
{/if}
|
||||
</div>
|
||||
</section>
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
{* Licensing info *}
|
||||
{if $currentContext->getLocalizedData('licenseTerms') || $publication->getData('licenseUrl')}
|
||||
<div class="item copyright">
|
||||
<h2 class="label">
|
||||
{translate key="submission.license"}
|
||||
</h2>
|
||||
{if $publication->getData('licenseUrl')}
|
||||
{if $ccLicenseBadge}
|
||||
{if $publication->getLocalizedData('copyrightHolder')}
|
||||
<p>{translate key="submission.copyrightStatement" copyrightHolder=$publication->getLocalizedData('copyrightHolder') copyrightYear=$publication->getData('copyrightYear')}</p>
|
||||
{/if}
|
||||
{$ccLicenseBadge}
|
||||
{else}
|
||||
<a href="{$publication->getData('licenseUrl')|escape}" class="copyright">
|
||||
{if $publication->getLocalizedData('copyrightHolder')}
|
||||
{translate key="submission.copyrightStatement" copyrightHolder=$publication->getLocalizedData('copyrightHolder') copyrightYear=$publication->getData('copyrightYear')}
|
||||
{else}
|
||||
{translate key="submission.license"}
|
||||
{/if}
|
||||
</a>
|
||||
{/if}
|
||||
{/if}
|
||||
{$currentContext->getLocalizedData('licenseTerms')}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{call_hook name="Templates::Article::Details"}
|
||||
|
||||
</div><!-- .entry_details -->
|
||||
</div><!-- .row -->
|
||||
|
||||
</article>
|
||||
@@ -0,0 +1,106 @@
|
||||
{**
|
||||
* templates/frontend/objects/article_summary.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2021 Simon Fraser University
|
||||
* Copyright (c) 2003-2021 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* @brief View of an Article summary which is shown within a list of articles.
|
||||
*
|
||||
* @uses $article Article The article
|
||||
* @uses $authorUserGroups Traversible The set of author user groups
|
||||
* @uses $hasAccess bool Can this user access galleys for this context? The
|
||||
* context may be an issue or an article
|
||||
* @uses $showDatePublished bool Show the date this article was published?
|
||||
* @uses $hideGalleys bool Hide the article galleys for this article?
|
||||
* @uses $primaryGenreIds array List of file genre ids for primary file types
|
||||
* @uses $heading string HTML heading element, default: h2
|
||||
*}
|
||||
{assign var=publication value=$article->getCurrentPublication()}
|
||||
|
||||
{assign var=articlePath value=$publication->getData('urlPath')|default:$article->getId()}
|
||||
{if !$heading}
|
||||
{assign var="heading" value="h2"}
|
||||
{/if}
|
||||
|
||||
{if (!$section.hideAuthor && $publication->getData('hideAuthor') == \APP\submission\Submission::AUTHOR_TOC_DEFAULT) || $publication->getData('hideAuthor') == \APP\submission\Submission::AUTHOR_TOC_SHOW}
|
||||
{assign var="showAuthor" value=true}
|
||||
{/if}
|
||||
|
||||
<div class="obj_article_summary">
|
||||
{if $publication->getLocalizedData('coverImage')}
|
||||
<div class="cover">
|
||||
<a {if $journal}href="{url journal=$journal->getPath() page="article" op="view" path=$articlePath}"{else}href="{url page="article" op="view" path=$articlePath}"{/if} class="file">
|
||||
{assign var="coverImage" value=$publication->getLocalizedData('coverImage')}
|
||||
<img
|
||||
src="{$publication->getLocalizedCoverImageUrl($article->getData('contextId'))|escape}"
|
||||
alt="{$coverImage.altText|escape|default:''}"
|
||||
>
|
||||
</a>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<{$heading} class="title">
|
||||
<a id="article-{$article->getId()}" {if $journal}href="{url journal=$journal->getPath() page="article" op="view" path=$articlePath}"{else}href="{url page="article" op="view" path=$articlePath}"{/if}>
|
||||
{if $currentContext}
|
||||
{$publication->getLocalizedTitle(null, 'html')|strip_unsafe_html}
|
||||
{assign var=localizedSubtitle value=$publication->getLocalizedSubtitle(null, 'html')|strip_unsafe_html}
|
||||
{if $localizedSubtitle}
|
||||
<span class="subtitle">{$localizedSubtitle}</span>
|
||||
{/if}
|
||||
{else}
|
||||
{$publication->getLocalizedFullTitle(null, 'html')|strip_unsafe_html}
|
||||
<span class="subtitle">
|
||||
{$journal->getLocalizedName()|escape}
|
||||
</span>
|
||||
{/if}
|
||||
</a>
|
||||
</{$heading}>
|
||||
|
||||
{assign var=submissionPages value=$publication->getData('pages')}
|
||||
{assign var=submissionDatePublished value=$publication->getData('datePublished')}
|
||||
{if $showAuthor || $submissionPages || ($submissionDatePublished && $showDatePublished)}
|
||||
<div class="meta">
|
||||
{if $showAuthor}
|
||||
<div class="authors">
|
||||
{$publication->getAuthorString($authorUserGroups)|escape}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{* Page numbers for this article *}
|
||||
{if $submissionPages}
|
||||
<div class="pages">{$submissionPages|escape}</div>
|
||||
{/if}
|
||||
|
||||
{if $showDatePublished && $submissionDatePublished}
|
||||
<div class="published">
|
||||
{$submissionDatePublished|date_format:$dateFormatShort}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if !$hideGalleys}
|
||||
<ul class="galleys_links">
|
||||
{foreach from=$article->getGalleys() item=galley}
|
||||
{if $primaryGenreIds}
|
||||
{assign var="file" value=$galley->getFile()}
|
||||
{if !$galley->getRemoteUrl() && !($file && in_array($file->getGenreId(), $primaryGenreIds))}
|
||||
{continue}
|
||||
{/if}
|
||||
{/if}
|
||||
<li>
|
||||
{assign var="hasArticleAccess" value=$hasAccess}
|
||||
{if $currentContext->getSetting('publishingMode') == \APP\journal\Journal::PUBLISHING_MODE_OPEN || $publication->getData('accessStatus') == \APP\submission\Submission::ARTICLE_ACCESS_OPEN}
|
||||
{assign var="hasArticleAccess" value=1}
|
||||
{/if}
|
||||
{assign var="id" value="article-{$article->getId()}-galley-{$galley->getId()}"}
|
||||
{include file="frontend/objects/galley_link.tpl" parent=$article publication=$publication id=$id labelledBy="{$id} article-{$article->getId()}" hasAccess=$hasArticleAccess purchaseFee=$currentJournal->getData('purchaseArticleFee') purchaseCurrency=$currentJournal->getData('currency')}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
|
||||
{call_hook name="Templates::Issue::Issue::Article"}
|
||||
</div>
|
||||
@@ -0,0 +1,84 @@
|
||||
{**
|
||||
* templates/frontend/objects/galley_link.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2021 Simon Fraser University
|
||||
* Copyright (c) 2003-2021 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* @brief View of a galley object as a link to view or download the galley, to be used
|
||||
* in a list of galleys.
|
||||
*
|
||||
* @uses $galley Galley
|
||||
* @uses $parent Issue|Article Object which these galleys are attached to
|
||||
* @uses $publication Publication Optionally the publication (version) to which this galley is attached
|
||||
* @uses $isSupplementary bool Is this a supplementary file?
|
||||
* @uses $hasAccess bool Can this user access galleys for this context?
|
||||
* @uses $restrictOnlyPdf bool Is access only restricted to PDF galleys?
|
||||
* @uses $purchaseArticleEnabled bool Can this article be purchased?
|
||||
* @uses $currentJournal Journal The current journal context
|
||||
* @uses $journalOverride Journal An optional argument to override the current
|
||||
* journal with a specific context
|
||||
*}
|
||||
|
||||
{* Override the $currentJournal context if desired *}
|
||||
{if $journalOverride}
|
||||
{assign var="currentJournal" value=$journalOverride}
|
||||
{/if}
|
||||
|
||||
{* Determine galley type and URL op *}
|
||||
{if $galley->isPdfGalley()}
|
||||
{assign var="type" value="pdf"}
|
||||
{else}
|
||||
{assign var="type" value="file"}
|
||||
{/if}
|
||||
|
||||
{* Get path for URL *}
|
||||
{if $parent instanceOf \APP\issue\Issue}
|
||||
{assign var="page" value="issue"}
|
||||
{assign var="parentId" value=$parent->getBestIssueId()}
|
||||
{assign var="path" value=$parentId|to_array:$galley->getBestGalleyId()}
|
||||
{else}{* \APP\submission\Submission *}
|
||||
{assign var="page" value="article"}
|
||||
{if $publication}
|
||||
{if $publication->getId() !== $parent->getData('currentPublicationId')}
|
||||
{* Get a versioned link if we have an older publication *}
|
||||
{assign var="path" value=$parent->getBestId()|to_array:"version":$publication->getId():$galley->getBestGalleyId()}
|
||||
{else}
|
||||
{assign var="parentId" value=$publication->getData('urlPath')|default:$article->getId()}
|
||||
{assign var="path" value=$parentId|to_array:$galley->getBestGalleyId()}
|
||||
{/if}
|
||||
{else}
|
||||
{assign var="path" value=$parent->getBestId()|to_array:$galley->getBestGalleyId()}
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{* Get user access flag *}
|
||||
{if !$hasAccess}
|
||||
{if $restrictOnlyPdf && $type=="pdf"}
|
||||
{assign var=restricted value="1"}
|
||||
{elseif !$restrictOnlyPdf}
|
||||
{assign var=restricted value="1"}
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
{* Don't be frightened. This is just a link *}
|
||||
<a class="{if $isSupplementary}obj_galley_link_supplementary{else}obj_galley_link{/if} {$type|escape}{if $restricted} restricted{/if}" href="{url page=$page op="view" path=$path}"{if $id} id="{$id}"{/if}{if $labelledBy} aria-labelledby="{$labelledBy}"{/if}>
|
||||
{* Add some screen reader text to indicate if a galley is restricted *}
|
||||
{if $restricted}
|
||||
<span class="pkp_screen_reader">
|
||||
{if $purchaseArticleEnabled}
|
||||
{translate key="reader.subscriptionOrFeeAccess"}
|
||||
{else}
|
||||
{translate key="reader.subscriptionAccess"}
|
||||
{/if}
|
||||
</span>
|
||||
{/if}
|
||||
|
||||
{$galley->getGalleyLabel()|escape}
|
||||
|
||||
{if $restricted && $purchaseFee && $purchaseCurrency}
|
||||
<span class="purchase_cost">
|
||||
{translate key="reader.purchasePrice" price=$purchaseFee currency=$purchaseCurrency}
|
||||
</span>
|
||||
{/if}
|
||||
</a>
|
||||
@@ -0,0 +1,44 @@
|
||||
{**
|
||||
* templates/frontend/objects/issue_summary.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2021 Simon Fraser University
|
||||
* Copyright (c) 2003-2021 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* @brief View of an Issue which displays a summary for use in lists
|
||||
*
|
||||
* @uses $issue Issue The issue
|
||||
*}
|
||||
{if $issue->getShowTitle()}
|
||||
{assign var=issueTitle value=$issue->getLocalizedTitle()|escape}
|
||||
{/if}
|
||||
{assign var=issueSeries value=$issue->getIssueSeries()}
|
||||
{assign var=issueCover value=$issue->getLocalizedCoverImageUrl()}
|
||||
|
||||
<div class="obj_issue_summary">
|
||||
|
||||
{if $issueCover}
|
||||
<a class="cover" href="{url op="view" path=$issue->getBestIssueId()}">
|
||||
<img src="{$issueCover|escape}" alt="{$issue->getLocalizedCoverImageAltText()|escape|default:''}">
|
||||
</a>
|
||||
{/if}
|
||||
|
||||
<h2>
|
||||
<a class="title" href="{url op="view" path=$issue->getBestIssueId()}">
|
||||
{if $issueTitle}
|
||||
{$issueTitle|escape}
|
||||
{else}
|
||||
{$issueSeries|escape}
|
||||
{/if}
|
||||
</a>
|
||||
{if $issueTitle && $issueSeries}
|
||||
<div class="series">
|
||||
{$issueSeries|escape}
|
||||
</div>
|
||||
{/if}
|
||||
</h2>
|
||||
|
||||
<div class="description">
|
||||
{$issue->getLocalizedDescription()|strip_unsafe_html}
|
||||
</div>
|
||||
</div><!-- .obj_issue_summary -->
|
||||
@@ -0,0 +1,147 @@
|
||||
{**
|
||||
* templates/frontend/objects/issue_toc.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2021 Simon Fraser University
|
||||
* Copyright (c) 2003-2021 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* @brief View of an Issue which displays a full table of contents.
|
||||
*
|
||||
* @uses $issue Issue The issue
|
||||
* @uses $issueTitle string Title of the issue. May be empty
|
||||
* @uses $issueSeries string Vol/No/Year string for the issue
|
||||
* @uses $issueGalleys array Galleys for the entire issue
|
||||
* @uses $hasAccess bool Can this user access galleys for this context?
|
||||
* @uses $publishedSubmissions array Lists of articles published in this issue
|
||||
* sorted by section.
|
||||
* @uses $primaryGenreIds array List of file genre ids for primary file types
|
||||
* @uses $heading string HTML heading element, default: h2
|
||||
*}
|
||||
{if !$heading}
|
||||
{assign var="heading" value="h2"}
|
||||
{/if}
|
||||
{assign var="articleHeading" value="h3"}
|
||||
{if $heading == "h3"}
|
||||
{assign var="articleHeading" value="h4"}
|
||||
{elseif $heading == "h4"}
|
||||
{assign var="articleHeading" value="h5"}
|
||||
{elseif $heading == "h5"}
|
||||
{assign var="articleHeading" value="h6"}
|
||||
{/if}
|
||||
<div class="obj_issue_toc">
|
||||
|
||||
{* Indicate if this is only a preview *}
|
||||
{if !$issue->getPublished()}
|
||||
{include file="frontend/components/notification.tpl" type="warning" messageKey="editor.issues.preview"}
|
||||
{/if}
|
||||
|
||||
{* Issue introduction area above articles *}
|
||||
<div class="heading">
|
||||
|
||||
{* Issue cover image *}
|
||||
{assign var=issueCover value=$issue->getLocalizedCoverImageUrl()}
|
||||
{if $issueCover}
|
||||
<div class="cover">
|
||||
{capture assign="defaultAltText"}
|
||||
{translate key="issue.viewIssueIdentification" identification=$issue->getIssueIdentification()|escape}
|
||||
{/capture}
|
||||
<img src="{$issueCover|escape}" alt="{$issue->getLocalizedCoverImageAltText()|escape|default:$defaultAltText}">
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{* Description *}
|
||||
{if $issue->hasDescription()}
|
||||
<div class="description">
|
||||
{$issue->getLocalizedDescription()|strip_unsafe_html}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{* PUb IDs (eg - URN) *}
|
||||
{foreach from=$pubIdPlugins item=pubIdPlugin}
|
||||
{assign var=pubId value=$issue->getStoredPubId($pubIdPlugin->getPubIdType())}
|
||||
{if $pubId}
|
||||
{assign var="resolvingUrl" value=$pubIdPlugin->getResolvingURL($currentJournal->getId(), $pubId)|escape}
|
||||
<div class="pub_id {$pubIdPlugin->getPubIdType()|escape}">
|
||||
<span class="type">
|
||||
{$pubIdPlugin->getPubIdDisplayType()|escape}:
|
||||
</span>
|
||||
<span class="id">
|
||||
{if $resolvingUrl}
|
||||
<a href="{$resolvingUrl|escape}">
|
||||
{$resolvingUrl}
|
||||
</a>
|
||||
{else}
|
||||
{$pubId}
|
||||
{/if}
|
||||
</span>
|
||||
</div>
|
||||
{/if}
|
||||
{/foreach}
|
||||
|
||||
{* DOI *}
|
||||
{assign var=doiObject value=$issue->getData('doiObject')}
|
||||
{if $doiObject}
|
||||
{assign var="doiUrl" value=$doiObject->getData('resolvingUrl')|escape}
|
||||
<div class="pub_id doi">
|
||||
<span class="type">
|
||||
DOI:
|
||||
</span>
|
||||
<span class="id">
|
||||
<a href="{$doiUrl|escape}">
|
||||
{$doiUrl}
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{* Published date *}
|
||||
{if $issue->getDatePublished()}
|
||||
<div class="published">
|
||||
<span class="label">
|
||||
{translate key="submissions.published"}:
|
||||
</span>
|
||||
<span class="value">
|
||||
{$issue->getDatePublished()|date_format:$dateFormatShort}
|
||||
</span>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{* Full-issue galleys *}
|
||||
{if $issueGalleys}
|
||||
<div class="galleys">
|
||||
<{$heading} id="issueTocGalleyLabel">
|
||||
{translate key="issue.fullIssue"}
|
||||
</{$heading}>
|
||||
<ul class="galleys_links">
|
||||
{foreach from=$issueGalleys item=galley}
|
||||
<li>
|
||||
{include file="frontend/objects/galley_link.tpl" parent=$issue labelledBy="issueTocGalleyLabel" purchaseFee=$currentJournal->getData('purchaseIssueFee') purchaseCurrency=$currentJournal->getData('currency')}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{* Articles *}
|
||||
<div class="sections">
|
||||
{foreach name=sections from=$publishedSubmissions item=section}
|
||||
<div class="section">
|
||||
{if $section.articles}
|
||||
{if $section.title}
|
||||
<{$heading}>
|
||||
{$section.title|escape}
|
||||
</{$heading}>
|
||||
{/if}
|
||||
<ul class="cmp_article_list articles">
|
||||
{foreach from=$section.articles item=article}
|
||||
<li>
|
||||
{include file="frontend/objects/article_summary.tpl" heading=$articleHeading}
|
||||
</li>
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/if}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div><!-- .sections -->
|
||||
</div>
|
||||
Reference in New Issue
Block a user