{** * templates/frontend/pages/userSubscriptions.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. * * @brief Page where users can view and manage their subscriptions. * * @uses $paymentsEnabled boolean * @uses $individualSubscriptionTypesExist boolean Have any individual * subscription types been created? * @uses $userIndividualSubscription IndividualSubscription * @uses $institutionalSubscriptionTypesExist boolean Have any institutional * subscription types been created? * @uses $userInstitutionalSubscriptions array *} {include file="frontend/components/header.tpl" pageTitle="user.subscriptions.mySubscriptions"}
{include file="frontend/components/breadcrumbs.tpl" currentTitleKey="user.subscriptions.mySubscriptions"} {include file="frontend/components/subscriptionContact.tpl"} {if $paymentsEnabled}

{translate key="user.subscriptions.subscriptionStatus"}

{translate key="user.subscriptions.statusInformation"}

{translate key="user.subscriptions.status"} {translate key="user.subscriptions.statusDescription"}
{translate key="subscriptions.status.needsInformation"} {translate key="user.subscriptions.status.needsInformationDescription"}
{translate key="subscriptions.status.needsApproval"} {translate key="user.subscriptions.status.needsApprovalDescription"}
{translate key="subscriptions.status.awaitingManualPayment"} {translate key="user.subscriptions.status.awaitingManualPaymentDescription"}
{translate key="subscriptions.status.awaitingOnlinePayment"} {translate key="user.subscriptions.status.awaitingOnlinePaymentDescription"}
{/if} {if $individualSubscriptionTypesExist}

{translate key="user.subscriptions.individualSubscriptions"}

{translate key="subscriptions.individualDescription"}

{if $userIndividualSubscription} {if $paymentsEnabled} {/if} {if $paymentsEnabled} {/if}
{translate key="user.subscriptions.form.typeId"} {translate key="subscriptions.status"}
{$userIndividualSubscription->getSubscriptionTypeName()|escape} {assign var="subscriptionStatus" value=$userIndividualSubscription->getStatus()} {assign var="isNonExpiring" value=$userIndividualSubscription->isNonExpiring()} {if $paymentsEnabled && $subscriptionStatus == $smarty.const.SUBSCRIPTION_STATUS_AWAITING_ONLINE_PAYMENT} {translate key="subscriptions.status.awaitingOnlinePayment"} {elseif $paymentsEnabled && $subscriptionStatus == $smarty.const.SUBSCRIPTION_STATUS_AWAITING_MANUAL_PAYMENT} {translate key="subscriptions.status.awaitingManualPayment"} {elseif $subscriptionStatus != $smarty.const.SUBSCRIPTION_STATUS_ACTIVE} {translate key="subscriptions.inactive"} {else} {if $isNonExpiring} {translate key="subscriptionTypes.nonExpiring"} {else} {assign var="isExpired" value=$userIndividualSubscription->isExpired()} {if $isExpired} {translate key="user.subscriptions.expired" date=$userIndividualSubscription->getDateEnd()|date_format:$dateFormatShort} {else} {translate key="user.subscriptions.expires" date=$userIndividualSubscription->getDateEnd()|date_format:$dateFormatShort} {/if} {/if} {/if} {if $subscriptionStatus == $smarty.const.SUBSCRIPTION_STATUS_AWAITING_ONLINE_PAYMENT} getId()}"> {translate key="user.subscriptions.purchase"} {elseif $subscriptionStatus == $smarty.const.SUBSCRIPTION_STATUS_ACTIVE} {if !$isNonExpiring} getId()}"> {translate key="user.subscriptions.renew"} {/if} getId()}"> {translate key="user.subscriptions.purchase"} {/if}
{elseif $paymentsEnabled}

{translate key="user.subscriptions.purchaseNewSubscription"}

{else}

{translate key="user.subscriptions.viewSubscriptionTypes"}

{/if}
{/if} {if $institutionalSubscriptionTypesExist}

{translate key="user.subscriptions.institutionalSubscriptions"}

{translate key="subscriptions.institutionalDescription"} {if $paymentsEnabled} {translate key="subscriptions.institutionalOnlinePaymentDescription"} {/if}

{if $userInstitutionalSubscriptions} {if $paymentsEnabled} {/if} {iterate from=userInstitutionalSubscriptions item=userInstitutionalSubscription} {if $paymentsEnabled} {/if} {/iterate}
{translate key="user.subscriptions.form.typeId"} {translate key="user.subscriptions.form.institutionName"} {translate key="subscriptions.status"}
{$userInstitutionalSubscription->getSubscriptionTypeName()|escape} {$userInstitutionalSubscription->getInstitutionName()|escape} {assign var="subscriptionStatus" value=$userInstitutionalSubscription->getStatus()} {assign var="isNonExpiring" value=$userInstitutionalSubscription->isNonExpiring()} {if $paymentsEnabled && $subscriptionStatus == $smarty.const.SUBSCRIPTION_STATUS_AWAITING_ONLINE_PAYMENT} {translate key="subscriptions.status.awaitingOnlinePayment"} {elseif $paymentsEnabled && $subscriptionStatus == $smarty.const.SUBSCRIPTION_STATUS_AWAITING_MANUAL_PAYMENT} {translate key="subscriptions.status.awaitingManualPayment"} {elseif $paymentsEnabled && $subscriptionStatus == $smarty.const.SUBSCRIPTION_STATUS_NEEDS_APPROVAL} {translate key="subscriptions.status.needsApproval"} {elseif $subscriptionStatus != $smarty.const.SUBSCRIPTION_STATUS_ACTIVE} {translate key="subscriptions.inactive"} {else} {if $isNonExpiring} {translate key="subscriptionTypes.nonExpiring"} {else} {assign var="isExpired" value=$userInstitutionalSubscription->isExpired()} {if $isExpired} {translate key="user.subscriptions.expired" date=$userInstitutionalSubscription->getDateEnd()|date_format:$dateFormatShort} {else} {translate key="user.subscriptions.expires" date=$userInstitutionalSubscription->getDateEnd()|date_format:$dateFormatShort} {/if} {/if} {/if} {if $subscriptionStatus == $smarty.const.SUBSCRIPTION_STATUS_AWAITING_ONLINE_PAYMENT} getId()}"> {translate key="user.subscriptions.purchase"} {elseif $subscriptionStatus == $smarty.const.SUBSCRIPTION_STATUS_ACTIVE} {if !$isNonExpiring} getId()}"> {translate key="user.subscriptions.renew"} {/if} getId()}"> {translate key="user.subscriptions.purchase"} {/if}
{/if}

{if $paymentsEnabled} {translate key="user.subscriptions.purchaseNewSubscription"} {else} {translate key="user.subscriptions.viewSubscriptionTypes"} {/if}

{/if}
{include file="frontend/components/footer.tpl"}