{* +--------------------------------------------------------------------+ | CiviCRM version 4.7 | +--------------------------------------------------------------------+ | Copyright CiviCRM LLC (c) 2004-2017 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | | CiviCRM is free software; you can copy, modify, and distribute it | | under the terms of the GNU Affero General Public License | | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. | | | | CiviCRM is distributed in the hope that it will be useful, but | | WITHOUT ANY WARRANTY; without even the implied warranty of | | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | | See the GNU Affero General Public License for more details. | | | | You should have received a copy of the GNU Affero General Public | | License and the CiviCRM Licensing Exception along | | with this program; if not, contact CiviCRM LLC | | at info[AT]civicrm[DOT]org. If you have questions about the | | GNU Affero General Public License or the licensing of CiviCRM, | | see the CiviCRM license FAQ at http://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.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}{ts}Auto-renew{/ts} {/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.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}{ts}Auto-renew{/ts} {/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. *}