{** * plugins/pubIds/urn/templates/urnSuffixEdit.tpl * * Copyright (c) 2014-2018 Simon Fraser University * Copyright (c) 2003-2018 John Willinsky * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING. * * Edit custom URN suffix for an object (issue, submission, file) * *} {load_script context="publicIdentifiersForm" scripts=$scripts} {assign var=pubObjectType value=$pubIdPlugin->getPubObjectType($pubObject)} {assign var=enableObjectURN value=$pubIdPlugin->getSetting($currentContext->getId(), "enable`$pubObjectType`URN")} {if $enableObjectURN} {assign var=storedPubId value=$pubObject->getStoredPubId($pubIdPlugin->getPubIdType())} {fbvFormArea id="pubIdURNFormArea" class="border" title="plugins.pubIds.urn.editor.urn"} {assign var=formArea value=true} {if $pubIdPlugin->getSetting($currentJournal->getId(), 'urnSuffix') == 'customId' || $storedPubId} {if empty($storedPubId)} {* edit custom suffix *} {fbvFormSection} {assign var=checkNo value=$pubIdPlugin->getSetting($currentContext->getId(), 'urnCheckNo')}

{translate key="plugins.pubIds.urn.manager.settings.urnSuffix.description"}

{fbvElement type="text" label="plugins.pubIds.urn.manager.settings.urnPrefix" id="urnPrefix" disabled=true value=$pubIdPlugin->getSetting($currentContext->getId(), 'urnPrefix') size=$fbvStyles.size.SMALL inline=true } {fbvElement type="text" label="plugins.pubIds.urn.manager.settings.urnSuffix" id="urnSuffix" value=$urnSuffix size=$fbvStyles.size.MEDIUM inline=true } {if $checkNo}{fbvElement type="button" label="plugins.pubIds.urn.editor.addCheckNo" id="checkNo" inline=true}{/if} {/fbvFormSection} {if $canBeAssigned}

{translate key="plugins.pubIds.urn.editor.canBeAssigned"}

{assign var=templatePath value=$pubIdPlugin->getTemplatePath()} {include file="`$templatePath`urnAssignCheckBox.tpl" pubId="" pubObjectType=$pubObjectType} {else}

{translate key="plugins.pubIds.urn.editor.customSuffixMissing"}

{/if} {else} {* stored pub id and clear option *}

{$storedPubId|escape}
{capture assign=translatedObjectType}{translate key="plugins.pubIds.urn.editor.urnObjectType"|cat:$pubObjectType}{/capture} {capture assign=assignedMessage}{translate key="plugins.pubIds.urn.editor.assigned" pubObjectType=$translatedObjectType}{/capture}

{$assignedMessage}

{include file="linkAction/linkAction.tpl" action=$clearPubIdLinkActionURN contextId="publicIdentifiersForm"}

{/if} {else} {* pub id preview *}

{$pubIdPlugin->getPubId($pubObject)|escape}

{if $canBeAssigned}

{translate key="plugins.pubIds.urn.editor.canBeAssigned"}

{assign var=templatePath value=$pubIdPlugin->getTemplatePath()} {include file="`$templatePath`urnAssignCheckBox.tpl" pubId="" pubObjectType=$pubObjectType} {else}

{translate key="plugins.pubIds.urn.editor.patternNotResolved"}

{/if} {/if} {/fbvFormArea} {/if} {* issue pub object *} {if $pubObjectType == 'Issue'} {assign var=enableSubmissionURN value=$pubIdPlugin->getSetting($currentContext->getId(), "enableSubmissionURN")} {assign var=enableRepresentationURN value=$pubIdPlugin->getSetting($currentContext->getId(), "enableRepresentationURN")} {if $enableSubmissionURN || $enableRepresentationURN} {if !$formArea} {assign var="formAreaTitle" value="plugins.pubIds.urn.editor.urn"} {else} {assign var="formAreaTitle" value=""} {/if} {fbvFormArea id="pubIdURNIssueobjectsFormArea" class="border" title=$formAreaTitle} {fbvFormSection list="true" description="plugins.pubIds.urn.editor.clearIssueObjectsURN.description"} {include file="linkAction/linkAction.tpl" action=$clearIssueObjectsPubIdsLinkActionURN contextId="publicIdentifiersForm"} {/fbvFormSection} {/fbvFormArea} {/if} {/if}