first commit

This commit is contained in:
CHIEFSOFT\ameye
2024-06-08 17:09:23 -04:00
commit df3a033196
17887 changed files with 8637778 additions and 0 deletions
@@ -0,0 +1,47 @@
{**
* templates/authorFormOrcid.tpl
*
* Copyright (c) 2017-2019 University Library Heidelberg
*
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* Extensions to Submissioni Metadata Author add/edit Form
*
*}
{fbvFormSection list="true" title="ORCID" translate=false}
{if $orcidAccessToken}
<p>{translate key='plugins.generic.orcidProfile.author.accessTokenStored' orcidAccessScope=$orcidAccessScope} {$orcidAccessExpiresOn|date_format:$datetimeFormatShort}</p>
{/if}
{if $orcidAccessDenied}
<p>{translate key='plugins.generic.orcidProfile.author.accessDenied'} {$orcidAccessDenied|date_format:$datetimeFormatShort}</p>
{/if}
{if !$orcidAuthenticated}
<p>{translate key='plugins.generic.orcidProfile.author.unauthenticated'}</p>
{/if}
{fbvElement type="checkbox" label="plugins.generic.orcidProfile.author.requestAuthorization" id="requestOrcidAuthorization" checked=false}
{if $orcid}
{fbvElement type="checkbox" label="plugins.generic.orcidProfile.author.deleteORCID" id="deleteOrcid" checked=false}
{else}
{fbvElement type="checkbox" label="plugins.generic.orcidProfile.author.deleteORCID" id="deleteOrcid" checked=false disabled=true}
{/if}
{/fbvFormSection}
<script type="text/javascript">
$(document).ready(function() {ldelim}
var orcidInput = $('input[name=orcid]');
orcidInput.attr('type', 'hidden');
// make the container div use the whole available space
orcidInput.parent().removeClass('pkp_helpers_quarter');
{if $orcid}
{* Display the ORCID id as an link *}
{if $orcidAuthenticated}
var orcidIconSvg = {$orcidIcon|json_encode}
{else}
var orcidIconSvg = '';
{/if}
var orcidLink = $('<a href="{$orcid}" target="_blank">' + orcidIconSvg + '{$orcid|escape}</a>');
orcidLink.insertAfter(orcidInput);
{else}
$('<span>{translate key='plugins.generic.orcidProfile.author.orcidEmptyNotice'}</span>').insertAfter(orcidInput);
{/if}
{rdelim});
</script>
@@ -0,0 +1,14 @@
<svg class="orcid_icon" viewBox="0 0 256 256" aria-hidden="true">
<style type="text/css">
.st0{fill:#A6CE39;}
.st1{fill:#FFFFFF;}
</style>
<path class="st0" d="M256,128c0,70.7-57.3,128-128,128C57.3,256,0,198.7,0,128C0,57.3,57.3,0,128,0C198.7,0,256,57.3,256,128z"/>
<g>
<path class="st1" d="M86.3,186.2H70.9V79.1h15.4v48.4V186.2z"/>
<path class="st1" d="M108.9,79.1h41.6c39.6,0,57,28.3,57,53.6c0,27.5-21.5,53.6-56.8,53.6h-41.8V79.1z M124.3,172.4h24.5
c34.9,0,42.9-26.5,42.9-39.7c0-21.5-13.7-39.7-43.7-39.7h-23.7V172.4z"/>
<path class="st1" d="M88.7,56.8c0,5.5-4.5,10.1-10.1,10.1c-5.6,0-10.1-4.6-10.1-10.1c0-5.6,4.5-10.1,10.1-10.1
C84.2,46.7,88.7,51.3,88.7,56.8z"/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 696 B

@@ -0,0 +1,35 @@
{**
* templates/orcidVerify.tpl
*
* Copyright (c) 2014-2020 Simon Fraser University
* Copyright (c) 2000-2020 John Willinsky
* Copyright (c) 2018-2019 University Library Heidelberg
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* Page template to display from the OrcidProfileHandler to show ORCID verification success or failure.
*}
{include file="frontend/components/header.tpl"}
<div class="page page_message">
{include file="frontend/components/breadcrumbs.tpl" currentTitleKey="plugins.generic.orcidProfile.about.title"}
<h2>
{translate key="plugins.generic.orcidProfile.about.title"}
</h2>
<div class="description">
{translate key="plugins.generic.orcidProfile.about.orcidExplanation"}
</div>
<h3>{translate key="plugins.generic.orcidProfile.about.howAndWhy.title"}</h3>
{if $isMemberApi}
<div class="description">
{translate key="plugins.generic.orcidProfile.about.howAndWhyMemberAPI"}
</div>
{else}
{translate key="plugins.generic.orcidProfile.about.howAndWhyPublicAPI"}
{/if}
<h3>{translate key="plugins.generic.orcidProfile.about.display.title"}</h3>
<div class="description">
{translate key="plugins.generic.orcidProfile.about.display"}
</div>
</div>
{include file="frontend/components/footer.tpl"}
@@ -0,0 +1,71 @@
{**
* templates/orcidProfile.tpl
*
* Copyright (c) 2015-2019 University of Pittsburgh
* 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.
*
* ORCID Profile authorization form
*
*}
{capture name=orcidButton assign=orcidButton}
<button id="connect-orcid-button" class="cmp_button" onclick="return openORCID();">
{if $orcid && $orcidAuthenticated }
{$orcidIcon}
{translate key='plugins.generic.orcidProfile.authorise'}
{else}
{translate key='plugins.generic.orcidProfile.connect'}
{/if}
</button>
<a href="{url router="page" page="orcidapi" op="about"}">{translate key='plugins.generic.orcidProfile.about.title'}</a>
{/capture}
{capture name=orcidLink assign=orcidLink}
{if $orcidAuthenticated}
<a href="{$orcid}" target="_blank">{$orcidIcon}{$orcid}</a>
{else}
<a href="{$orcid}" target="_blank">{$orcid}</a>&nbsp;{$orcidButton}
{/if}
{/capture}
<script type="text/javascript">
function openORCID() {ldelim}
// First sign out from ORCID to make sure no other user is logged in
// with ORCID
$.ajax({ldelim}
url: '{$orcidUrl|escape}userStatus.json?logUserOut=true',
dataType: 'jsonp',
success: function(result,status,xhr) {ldelim}
console.log("ORCID Logged In: " + result.loggedIn);
{rdelim},
error: function (xhr, status, error) {ldelim}
console.log(status + ", error: " + error);
{rdelim}
{rdelim});
var oauthWindow = window.open("{$orcidOAuthUrl}", "_blank", "toolbar=no, scrollbars=yes, width=500, height=700, top=500, left=500");
oauthWindow.opener = self;
return false;
{rdelim}
{if $targetOp eq 'profile'}
$(document).ready(function() {ldelim}
var orcidInput = $('input[name=orcid]');
orcidInput.attr('type', 'hidden');
var orcidLinkOrButton = $(
{if $orcid}
{$orcidLink|json_encode}
{else}
{$orcidButton|json_encode}
{/if});
orcidLinkOrButton.insertAfter(orcidInput);
{rdelim});
{/if}
</script>
{if $targetOp eq 'register'}
{fbvElement type="hidden" name="orcid" id="orcid" value=$orcid maxlength="46"}
{$orcidButton}
{/if}
@@ -0,0 +1,61 @@
{**
* templates/orcidVerify.tpl
*
* Copyright (c) 2014-2020 Simon Fraser University
* Copyright (c) 2000-2020 John Willinsky
* Copyright (c) 2018-2019 University Library Heidelberg
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* Page template to display from the OrcidProfileHandler to show ORCID verification success or failure.
*}
{include file="frontend/components/header.tpl"}
<div class="page page_message">
{include file="frontend/components/breadcrumbs.tpl" currentTitleKey="plugins.generic.orcidProfile.verify.title"}
<h2>
{translate key="plugins.generic.orcidProfile.verify.title"}
</h2>
<div class="description">
{if $verifySuccess}
<p>
<span class="orcid"><a href="{$orcid|escape}" target="_blank">{$orcidIcon}{$orcid|escape}</a></span>
</p>
<div class="orcid-success">
{translate key="plugins.generic.orcidProfile.verify.success"}
</div>
{if $sendSubmission}
{if $sendSubmissionSuccess}
<div class="orcid-success">
{translate key="plugins.generic.orcidProfile.verify.sendSubmissionToOrcid.success"}
</div>
{else}
<div class="orcid-failure">
{translate key="plugins.generic.orcidProfile.verify.sendSubmissionToOrcid.failure"}
</div>
{/if}
{elseif $submissionNotPublished}
{translate key="plugins.generic.orcidProfile.verify.sendSubmissionToOrcid.notpublished"}
{/if}
{else}
<div class="orcid-failure">
{if $orcidAPIError}
{$orcidAPIError}
{/if}
{if $invalidClient}
{translate key="plugins.generic.orcidProfile.invalidClient"}
{elseif $duplicateOrcid}
{translate key="plugins.generic.orcidProfile.verify.duplicateOrcid"}
{elseif $denied}
{translate key="plugins.generic.orcidProfile.authDenied"}
{elseif $authFailure}
{translate key="plugins.generic.orcidProfile.authFailure"}
{else}
{translate key="plugins.generic.orcidProfile.verify.failure"}
{/if}
</div>
{translate key="plugins.generic.orcidProfile.failure.contact"}
{/if}
</div>
</div>
{include file="frontend/components/footer.tpl"}
@@ -0,0 +1,66 @@
{**
* templates/settingsForm.tpl
*
* Copyright (c) 2015-2019 University of Pittsburgh
* Copyright (c) 2014-2020 Simon Fraser University
* Copyright (c) 2003-2020 John Willinsky
* Copyright (c) 2017-2019 University Library Heidelberg
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* ORCID Profile plugin settings
*
*}
<script>
$(function() {ldelim}
// Attach the form handler.
$('#orcidProfileSettingsForm').pkpHandler('$.pkp.controllers.form.AjaxFormHandler');
{rdelim});
</script>
<form class="pkp_form" id="orcidProfileSettingsForm" method="post" action="{url router=\PKP\core\PKPApplication::ROUTE_COMPONENT op="manage" category="generic" plugin=$pluginName verb="settings" save=true}">
<div id="orcidProfileSettings">
<p id="description">
{translate key="plugins.generic.orcidProfile.manager.settings.description" }
</p>
{csrf}
{include file="controllers/notification/inPlaceNotification.tpl" notificationId="orcidProfileSettingsFormNotification"}
{fbvFormArea id="orcidApiSettings" title="plugins.generic.orcidProfile.manager.settings.title"}
{fbvFormSection}
{if $globallyConfigured}
<p>
{translate key="plugins.generic.orcidProfile.manager.settings.description.globallyconfigured"}
</p>
{/if}
{fbvElement id="orcidProfileAPIPath" type="select" translate="true" from=$orcidApiUrls selected=$orcidProfileAPIPath required="true" label="plugins.generic.orcidProfile.manager.settings.orcidProfileAPIPath" disabled=$globallyConfigured}
{fbvElement type="text" id="orcidClientId" value=$orcidClientId required="true" label="plugins.generic.orcidProfile.manager.settings.orcidClientId" maxlength="40" size=$fbvStyles.size.MEDIUM disabled=$globallyConfigured}
{if $globallyConfigured}
<p>
{translate key="plugins.generic.orcidProfile.manager.settings.orcidClientSecret"}: <i>{translate key="plugins.generic.orcidProfile.manager.settings.hidden"}</i>
</p>
{else}
{fbvElement type="text" id="orcidClientSecret" value=$orcidClientSecret required="true" label="plugins.generic.orcidProfile.manager.settings.orcidClientSecret" maxlength="40" size=$fbvStyles.size.MEDIUM disabled=$globallyConfigured}
{/if}
{/fbvFormSection}
{/fbvFormArea}
{if $applicationName == 'ojs2'}
{fbvFormSection for="coutries" title="plugins.generic.orcidProfile.manager.settings.review"}
<p class="pkp_help">{translate key="plugins.generic.orcidProfile.manager.settings.review.help"}</p>
{fbvElement id="country" label="plugins.generic.orcidProfile.manager.settings.country" name="country" type="select" from=$countries translate=false selected=$country}
{/fbvFormSection}
{fbvElement type="text" id="city" value=$city label="plugins.generic.orcidProfile.manager.settings.city" maxlength="40" size=$fbvStyles.size.MEDIUM }
{/if}
{fbvFormSection for="sendMailToAuthorsOnPublication" title="plugins.generic.orcidProfile.manager.settings.mailSectionTitle" list="true"}
{fbvElement type="checkbox" name="sendMailToAuthorsOnPublication" label="plugins.generic.orcidProfile.manager.settings.sendMailToAuthorsOnPublication" id="sendMailToAuthorsOnPublication" checked=$sendMailToAuthorsOnPublication}
{/fbvFormSection}
{fbvFormSection for="logLevel" title="plugins.generic.orcidProfile.manager.settings.logSectionTitle"}
<p class="pkp_help">{translate key="plugins.generic.orcidProfile.manager.settings.logLevel.help"}</p>
{fbvElement id="logLevel" name="logLevel" type="select" from=$logLevelOptions selected=$logLevel}
{/fbvFormSection}
{fbvFormButtons}
<p><span class="formRequired">{translate key="common.requiredField"}</span></p>
</div>
</form>
@@ -0,0 +1,62 @@
{**
* templates/settingsForm.tpl
*
* Copyright (c) 2015-2019 University of Pittsburgh
* 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.
*
* ORCID Profile plugin settings
*
*}
<script>
$(function() {ldelim}
// Attach the form handler.
$('#orcidProfileStatusForm').pkpHandler('$.pkp.controllers.form.AjaxFormHandler');
{rdelim});
</script>
<div id="orcidProfileStatus">
<h3>{translate key="plugins.generic.orcidProfile.manager.status.description"}</h3>
<div class="description">
{if $globallyConfigured}
{translate key="plugins.generic.orcidProfile.manager.status.configuration.global"}
{else}
{translate key="plugins.generic.orcidProfile.manager.status.configuration.journal"}
{/if}
</div>
<div class="description">
{if $pluginEnabled}
<p>{translate key="plugins.generic.orcidProfile.manager.status.configuration.enabled"}</p>
{else}
<p>{translate key="plugins.generic.orcidProfile.manager.status.configuration.disabled"}</p>
</div>
{/if}
</div>
<div class="description">
{if $clientIdValid}
<p>{translate key="plugins.generic.orcidProfile.manager.status.configuration.clientIdValid"}</p>
{else}
<p>{translate key="plugins.generic.orcidProfile.manager.status.configuration.clientIdInvalid"}</p>
{/if}
</div>
<div class="description">
{if $clientSecretValid}
<p>{translate key="plugins.generic.orcidProfile.manager.status.configuration.clientSecretValid"}</p>
{else}
<p>{translate key="plugins.generic.orcidProfile.manager.status.configuration.clientSecretInvalid"}</p>
{/if}
</div>
</div>