| Server IP : 10.10.92.66 / Your IP : 104.23.243.85 Web Server : Apache/2.4.52 (Ubuntu) System : Linux jurnalpolinema 5.15.0-177-generic #187-Ubuntu SMP Sat Apr 11 22:54:33 UTC 2026 x86_64 User : jurnal ( 1001) PHP Version : 7.4.33 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/jurnal/public_html/templates/frontend/objects/ |
Upload File : |
{**
* 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 page and parentId for URL *}
{if $parent instanceOf Issue}
{assign var="page" value="issue"}
{assign var="parentId" value=$parent->getBestIssueId()}
{assign var="path" value=$parentId|to_array:$galley->getBestGalleyId()}
{else}
{assign var="page" value="article"}
{assign var="parentId" value=$parent->getBestId()}
{* Get a versioned link if we have an older publication *}
{if $publication && $publication->getId() !== $parent->getCurrentPublication()->getId()}
{assign var="path" value=$parentId|to_array:"version":$publication->getId():$galley->getBestGalleyId()}
{else}
{assign var="path" value=$parentId|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 $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>