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,35 @@
{**
* buttonConfirmationLinkAction.tpl
*
* Copyright (c) 2014-2021 Simon Fraser University
* Copyright (c) 2000-2021 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* Attach a link action to a button that opens a confirmation dialog and
* only clicks the button when the user confirms the dialog.
*
* Parameters:
* buttonSelector: A jQuery selector that designates the button to attach this
* link action to.
* dialogText: A translation key for the message to be displayed in the dialog.
*}
{if !$titleIcon}{assign var="titleIcon" value="modal_confirm"}{/if}
<script>
$(function() {ldelim}
$('{$buttonSelector|escape:javascript}').pkpHandler(
'$.pkp.controllers.linkAction.LinkActionHandler',
{ldelim}
actionRequest: '$.pkp.classes.linkAction.ModalRequest',
actionRequestOptions: {ldelim}
modalHandler: '$.pkp.controllers.modal.ButtonConfirmationModalHandler',
title: {translate|json_encode key="form.confirmSubmit.title"},
okButton: {translate|json_encode key="common.ok"},
cancelButton: {translate|json_encode key="common.cancel"},
dialogText: {translate|json_encode key=$dialogText},
$button: $({$buttonSelector|json_encode}),
titleIcon: {$titleIcon|json_encode},
width: 'auto'
{rdelim},
{rdelim});
{rdelim});
</script>
@@ -0,0 +1,23 @@
{**
* templates/linkAction/buttonGenericLinkAction.tpl
*
* Copyright (c) 2014-2021 Simon Fraser University
* Copyright (c) 2000-2021 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* Attach a link action to a button that opens a confirmation dialog and
* only clicks the button when the user confirms the dialog.
*
* Parameters:
* buttonSelector: A jQuery selector that designates the button to attach this
* link action to.
* dialogText: A translation key for the message to be displayed in the dialog.
*}
<script>
$(function() {ldelim}
$('{$buttonSelector|escape:jsid}').pkpHandler(
'$.pkp.controllers.linkAction.LinkActionHandler',
{include file="linkAction/linkActionOptions.tpl" action=$action});
{rdelim});
</script>
@@ -0,0 +1,29 @@
{**
* buttonRedirectLinkAction.tpl
*
* Copyright (c) 2014-2021 Simon Fraser University
* Copyright (c) 2000-2021 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* Attach a link action to a button that opens a confirmation dialog and
* only clicks the button when the user confirms the dialog.
*
* Parameters:
* buttonSelector: A jQuery selector that designates the button to attach this
* link action to.
* dialogText: A translation key for the message to be displayed in the dialog.
*}
<script>
$(function() {ldelim}
$('{$buttonSelector|escape:javascript}').pkpHandler(
'$.pkp.controllers.linkAction.LinkActionHandler',
{ldelim}
actionRequest: '$.pkp.classes.linkAction.RedirectRequest',
actionRequestOptions: {ldelim}
url: {$cancelUrl|json_encode},
name: {$cancelUrlTarget|json_encode}
{rdelim},
{rdelim});
{rdelim});
</script>
@@ -0,0 +1,36 @@
{**
* lib/pkp/templates/linkAction/linkAction.tpl
*
* Copyright (c) 2014-2021 Simon Fraser University
* Copyright (c) 2000-2021 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* Create a link action
*
* Parameters:
* action: A LinkAction object.
* contextId: The name of the context in which the link
* action is being placed. This is required to disambiguate
* actions with the same id on one page.
* anyhtml: True iff arbitrary HTML is permitted in the link action title (i.e. escaping handled elsewhere)
*}
{* Generate the link action's button. *}
{if $contextId}
{assign var=staticId value=$contextId|concat:"-":$action->getId():"-button"}
{else}
{assign var=staticId value=$action->getId()|concat:"-button"}
{/if}
{assign var=buttonId value=$staticId|concat:"-"|uniqid}
{include file="linkAction/linkActionButton.tpl" action=$action buttonId=$buttonId anyhtml=$anyhtml html=$html}
<script>
{* Attach the action handler to the button. *}
$(function() {ldelim}
$('#{$buttonId|escape:jqselector}').pkpHandler(
'$.pkp.controllers.linkAction.LinkActionHandler',
{include file="linkAction/linkActionOptions.tpl" action=$action selfActivate=$selfActivate staticId=$staticId}
);
{rdelim});
</script>
@@ -0,0 +1,31 @@
{**
* linkActionButton.tpl
*
* Copyright (c) 2014-2021 Simon Fraser University
* Copyright (c) 2000-2021 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* Template that renders a button for a link action.
*
* Parameter:
* action: The LinkAction we create a button for.
* buttonId: The id of the link.
* hoverTitle: Whether to show the title as hover text only.
* anyhtml: True iff the link action text permits all HTML (i.e. escaping handled elsewhere).
*}
<a
href="#"
id="{$buttonId|escape}"
{if $action->getToolTip()}
title="{$action->getToolTip()|escape}"
{/if}
class="pkp_controllers_linkAction pkp_linkaction_{$action->getId()} pkp_linkaction_icon_{$action->getImage()}"
>
{if $anyhtml}
{assign var=_labelTitle value=$action->getTitle()}
{else}
{assign var=_labelTitle value=$action->getTitle()|strip_unsafe_html}
{/if}
{$_labelTitle}
</a>
@@ -0,0 +1,30 @@
{**
* linkAction/linkActionOptions.tpl
*
* Copyright (c) 2014-2021 Simon Fraser University
* Copyright (c) 2000-2021 John Willinsky
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
*
* Create a link action
*
* Parameters:
* action: A LinkAction object.
* contextId: The name of the context in which the link
* action is being placed. This is required to disambiguate
* actions with the same id on one page.
*}
{* Generate the link action's options. *}
{ldelim}
{if $selfActivate}
selfActivate: {$selfActivate},
{/if}
staticId: {$staticId|json_encode},
{assign var="actionRequest" value=$action->getActionRequest()}
actionRequest: {$actionRequest->getJSLinkActionRequest()|json_encode},
actionRequestOptions: {ldelim}
{foreach name=actionRequestOptions from=$actionRequest->getLocalizedOptions() key=optionName item=optionValue}
{$optionName|json_encode}: {$optionValue|json_encode},
{/foreach}
{rdelim}
{rdelim}