{**
* templates/linkAction/legacyLinkAction.tpl
*
* Copyright (c) 2013-2015 Simon Fraser University Library
* Copyright (c) 2000-2015 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* Deprecated template to render link actions.
*}
{** if the actOnId has not been specified, assume the id plays the role *}
{if !$actOnId}
{assign var=actOnId value=$id}
{/if}
{* If we have no button id set then let's build our own button. *}
{if !$buttonId}
{assign var=buttonId value=$id|concat:"-":$action->getId():"-button"|uniqid}
{if $action->getImage()}
getLocalizedTitle()|escape}"> {else}>{$action->getLocalizedTitle()|escape}{/if}
{else}
{else}>{$action->getLocalizedTitle()|escape}{/if}
{/if}
{/if}
{if $action->getMode() eq $smarty.const.LINK_ACTION_MODE_MODAL}
{modal url=$action->getUrl() actOnType=$action->getType() actOnId="#"|concat:$actOnId button="#"|concat:$buttonId}
{elseif $action->getMode() eq $smarty.const.LINK_ACTION_MODE_CONFIRM}
{if $action->getLocalizedConfirmMessage()}
{assign var="dialogText" value=$action->getLocalizedConfirmMessage()}
{else}
{assign var="dialogText" value=$action->getLocalizedTitle()}
{/if}
{confirm url=$action->getUrl() dialogText=$dialogText actOnType=$action->getType() actOnId="#"|concat:$actOnId button="#"|concat:$buttonId translate=false}
{elseif $action->getMode() eq $smarty.const.LINK_ACTION_MODE_AJAX}
{/if}