{* +--------------------------------------------------------------------+ | Copyright CiviCRM LLC. All rights reserved. | | | | This work is published under the GNU AGPLv3 license with some | | permitted exceptions and without any warranty. For full license | | and copyright information, see https://civicrm.org/licensing | +--------------------------------------------------------------------+ *}
{if $action eq 1 or $action eq 2 or $action eq 8} {* add, update or delete *} {include file="CRM/Member/Form/Membership.tpl"} {elseif $action eq 4} {include file="CRM/Member/Form/MembershipView.tpl"} {elseif $action eq 32768} {* renew *} {include file="CRM/Member/Form/MembershipRenewal.tpl"} {elseif $action eq 16} {* Browse memberships for a contact *} {if $permission EQ 'edit'} {capture assign=newURL}{crmURL p="civicrm/contact/view/membership" q="reset=1&action=add&cid=`$contactId`&context=membership"}{/capture}{/if} {if $action ne 1 and $action ne 2 and $permission EQ 'edit'}
{if $permission EQ 'edit'} {capture assign="link"}class="action-item" href="{$newURL}"{/capture} {ts 1=$link}Click Add Membership to record a new membership.{/ts} {if $newCredit} {capture assign=newCreditURL}{crmURL p="civicrm/contact/view/membership" q="reset=1&action=add&cid=`$contactId`&context=membership&mode=live"}{/capture} {capture assign="link"}class="action-item" href="{$newCreditURL}"{/capture} {ts 1=$link}Click Submit Credit Card Membership to process a Membership on behalf of the member using their credit card.{/ts} {/if} {else} {ts 1=$displayName}Current and inactive memberships for %1 are listed below.{/ts} {/if}
{/if} {if NOT ($activeMembers or $inActiveMembers) and $action ne 2 and $action ne 1 and $action ne 8 and $action ne 4 and $action ne 32768}
{ts}No memberships have been recorded for this contact.{/ts}
{/if} {include file="CRM/common/jsortable.tpl"} {if $activeMembers}

{ts}Active Memberships{/ts}

{strip} {foreach from=$activeMembers item=activeMember} {/foreach}
{ts}Membership{/ts} {ts}Member Since{/ts} {ts}Start Date{/ts} {ts}End Date{/ts} {ts}Status{/ts} {ts}Source{/ts} {ts}Auto-renew{/ts} {ts}Related{/ts}
{$activeMember.membership_type}{if $activeMember.is_test} ({ts}test{/ts}){/if} {if $activeMember.owner_membership_id}
({ts}by relationship{/ts}){/if}
{$activeMember.join_date|crmDate} {$activeMember.start_date|crmDate} {$activeMember.end_date|crmDate} {$activeMember.status} {$activeMember.source} {if $activeMember.auto_renew eq 1} {elseif $activeMember.auto_renew eq 2} {/if} {$activeMember.action|replace:'xx':$activeMember.id} {if $activeMember.owner_membership_id} {ts}View Primary{/ts} {/if}
{/strip}
{/if} {if $inActiveMembers}

{ts}Pending and Inactive Memberships{/ts}

{strip} {foreach from=$inActiveMembers item=inActiveMember} {/foreach}
{ts}Membership{/ts} {ts}Member Since{/ts} {ts}Start Date{/ts} {ts}End Date{/ts} {ts}Status{/ts} {ts}Source{/ts} {ts}Auto-renew{/ts}
{$inActiveMember.membership_type}{if $inActiveMember.is_test} ({ts}test{/ts}){/if} {if $inActiveMember.owner_membership_id}
({ts}by relationship{/ts}){/if}
{$inActiveMember.join_date|crmDate} {$inActiveMember.start_date|crmDate} {$inActiveMember.end_date|crmDate} {$inActiveMember.status} {$inActiveMember.source} {if $inActiveMember.auto_renew eq 1} {elseif $inActiveMember.auto_renew eq 2} {/if} {$inActiveMember.action|replace:'xx':$inActiveMember.id} {if $inActiveMember.owner_membership_id} {ts}View Primary{/ts} {/if}
{/strip}
{/if} {if $membershipTypes}
 
{ts}The following Membership Types are associated with this organization. Click Members for a listing of all contacts who have memberships of that type. Click Edit to modify the settings for that type.{/ts}
{strip} {foreach from=$membershipTypes item=membershipType} {/foreach}
{ts}Name{/ts} {ts}Period{/ts} {ts}Fixed Start{/ts} {ts}Minimum Fee{/ts} {ts}Duration{/ts} {ts}Visibility{/ts}
{$membershipType.name} {$membershipType.period_type} {$membershipType.fixed_period_start_day} {$membershipType.minimum_fee} {$membershipType.duration_unit} {$membershipType.visibility} {$membershipType.action|replace:xx:$membershipType.id}
{/strip}
{/if} {/if} {* End of $action eq 16 - browse memberships. *}