{** * plugins/blocks/subscription/block.tpl * * Copyright (c) 2013-2018 Simon Fraser University * Copyright (c) 2003-2018 John Willinsky * Distributed under the GNU GPL v2. For full terms see the file docs/COPYING. * * @brief Display the logged-in user's subscriptions * *} {if $individualSubscription} {assign var=individualSubscriptionValid value=$individualSubscription->isValid()} {assign var=subscriptionStatus value=$individualSubscription->getStatus()} {/if}
{translate key="plugins.block.subscription.blockTitle"}
{if $institutionalSubscription}

{translate key="plugins.block.subscription.providedBy" institutionName=$institutionalSubscription->getInstitutionName()|escape}

{translate key="plugins.block.subscription.comingFromIP" ip=$userIP|escape}

{elseif $individualSubscription}

{$individualSubscription->getSubscriptionTypeName()|escape}

{if $individualSubscription->getMembership()}

({$individualSubscription->getMembership()|escape})

{/if} {if $paymentsEnabled && $acceptSubscriptionPayments && $subscriptionStatus == $smarty.const.SUBSCRIPTION_STATUS_AWAITING_ONLINE_PAYMENT}

{translate key="subscriptions.status.awaitingOnlinePayment"}

{elseif $paymentsEnabled && $acceptSubscriptionPayments && $subscriptionStatus == $smarty.const.SUBSCRIPTION_STATUS_AWAITING_MANUAL_PAYMENT}

{translate key="subscriptions.status.awaitingManualPayment"}

{elseif $individualSubscription->isNonExpiring()}

{translate key="subscriptionTypes.nonExpiring"}

{elseif $individualSubscription->isExpired()}

{translate key="user.subscriptions.expired" date=$individualSubscription->getDateEnd()|date_format:$dateFormatShort}

{else}

{translate key="user.subscriptions.expires" date=$individualSubscription->getDateEnd()|date_format:$dateFormatShort}

{/if} {elseif !$userLoggedIn}

{translate key="plugins.block.subscription.loginToVerifySubscription"}

{/if} {if $userLoggedIn}

{if $institutionalSubscription || $individualSubscription} {translate key="user.subscriptions.mySubscriptions"} {else} {translate key="plugins.block.subscription.subscriptionRequired"} {translate key="plugins.block.subscription.subscriptionRequired.learnMore"} {/if}

{/if}