2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.5 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2014 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
26 <div class="view-content">
27 {if $action eq 1 or $action eq 2 or $action eq 8} {* add, update or delete *}
28 {include file="CRM/Member/Form/Membership.tpl"}
30 {include file="CRM/Member/Form/MembershipView.tpl"}
31 {elseif $action eq 32768} {* renew *}
32 {include file="CRM/Member/Form/MembershipRenewal.tpl"}
33 {elseif $action eq 16} {* Browse memberships for a contact *}
34 {if $permission EQ 'edit'}
35 {capture assign=newURL}{crmURL p="civicrm/contact/view/membership" q="reset=1&action=add&cid=`$contactId`&context=membership"}{/capture}{/if}
37 {if $action ne 1 and $action ne 2 and $permission EQ 'edit'}
39 {if $permission EQ 'edit'}
40 {capture assign="link"}class="action-item" href="{$newURL}"{/capture}
41 {ts 1=$link}Click <a %1>Add Membership</a> to record a new membership.{/ts}
43 {capture assign=newCreditURL}{crmURL p="civicrm/contact/view/membership" q="reset=1&action=add&cid=`$contactId`&context=membership&mode=live"}{/capture}
44 {capture assign="link"}class="action-item" href="{$newCreditURL}"{/capture}
45 {ts 1=$link}Click <a %1>Submit Credit Card Membership</a> to process a Membership on behalf of the member using their credit card.{/ts}
48 {ts 1=$displayName}Current and inactive memberships for %1 are listed below.{/ts}
52 <div class="action-link">
53 <a accesskey="N" href="{$newURL}" class="button"><span><div class="icon add-icon"></div>{ts}Add Membership{/ts}</span></a>
54 {if $accessContribution and $newCredit}
55 <a accesskey="N" href="{$newCreditURL}" class="button"><span><div class="icon add-icon"></div>{ts}Submit Credit Card Membership{/ts}</span></a><br /><br />
61 {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}
62 <div class="messages status no-popup">
63 <div class="icon inform-icon"></div>
64 {ts}No memberships have been recorded for this contact.{/ts}
67 {include file="CRM/common/jsortable.tpl"}
69 <div id="memberships">
70 <h3>{ts}Active Memberships{/ts}</h3>
72 <table id="active_membership" class="display">
75 <th>{ts}Membership{/ts}</th>
76 <th>{ts}Member Since{/ts}</th>
77 <th>{ts}Start Date{/ts}</th>
78 <th>{ts}End Date{/ts}</th>
79 <th>{ts}Status{/ts}</th>
80 <th>{ts}Source{/ts}</th>
81 <th>{ts}Auto-renew{/ts}</th>
82 <th>{ts}Related{/ts}</th>
86 {foreach from=$activeMembers item=activeMember}
87 <tr id="crm-membership_{$activeMember.id}" class="{cycle values="odd-row,even-row"} {$activeMember.class} crm-membership">
88 <td class="crm-membership-membership_type">
89 {$activeMember.membership_type}
90 {if $activeMember.owner_membership_id}<br />({ts}by relationship{/ts}){/if}
92 <td class="crm-membership-join_date">{$activeMember.join_date|crmDate}</td>
93 <td class="crm-membership-start_date">{$activeMember.start_date|crmDate}</td>
94 <td class="crm-membership-end_date">{$activeMember.end_date|crmDate}</td>
95 <td class="crm-membership-status">{$activeMember.status}</td>
96 <td class="crm-membership-source">{$activeMember.source}</td>
97 <td class="crm-membership-auto_renew">{if $activeMember.auto_renew}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Auto-renew{/ts}" /> {/if}</td>
98 <td class="crm-membership-related_count">{$activeMember.related_count}</td>
100 {$activeMember.action|replace:'xx':$activeMember.id}
101 {if $activeMember.owner_membership_id}
102 <a href="{crmURL p='civicrm/membership/view' q="reset=1&id=`$activeMember.owner_membership_id`&action=view&context=membership&selectedChild=member"}" title="{ts}View Primary member record{/ts}" class="action-item">{ts}View Primary{/ts}</a>
112 {if $inActiveMembers}
113 <div id="inactive-memberships">
115 <h3 class="font-red">{ts}Pending and Inactive Memberships{/ts}</h3>
117 <table id="pending_membership" class="display">
120 <th>{ts}Membership{/ts}</th>
121 <th>{ts}Start Date{/ts}</th>
122 <th>{ts}End Date{/ts}</th>
123 <th>{ts}Status{/ts}</th>
124 <th>{ts}Source{/ts}</th>
125 <th>{ts}Auto-renew{/ts}</th>
129 {foreach from=$inActiveMembers item=inActiveMember}
130 <tr id="crm-membership_{$inActiveMember.id}" class="{cycle values="odd-row,even-row"} {$inActiveMember.class} crm-membership">
131 <td class="crm-membership-membership_type">{$inActiveMember.membership_type}
132 {if $inActiveMember.owner_membership_id}<br />({ts}by relationship{/ts}){/if}
134 <td class="crm-membership-start_date">{$inActiveMember.start_date|crmDate}</td>
135 <td class="crm-membership-end_date">{$inActiveMember.end_date|crmDate}</td>
136 <td class="crm-membership-status">{$inActiveMember.status}</td>
137 <td class="crm-membership-source">{$inActiveMember.source}</td>
138 <td class="crm-membership-auto_renew">{if $inActiveMember.auto_renew}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Auto-renew{/ts}" /> {/if}</td>
139 <td>{$inActiveMember.action|replace:'xx':$inActiveMember.id}
140 {if $inActiveMember.owner_membership_id}
141 <a href="{crmURL p='civicrm/membership/view' q="reset=1&id=`$inActiveMember.owner_membership_id`&action=view&context=membership&selectedChild=member"}" title="{ts}View Primary member record{/ts}" class="action-item">{ts}View Primary{/ts}
152 {if $membershipTypes}
153 <div class="solid-border-bottom"> </div>
154 <div id="membership-types">
155 <div><label>{ts}Membership Types{/ts}</label></div>
157 {ts}The following Membership Types are associated with this organization. Click <strong>Members</strong> for a listing of all contacts who have memberships of that type. Click <strong>Edit</strong> to modify the settings for that type.{/ts}
158 <div class="form-item">
160 <table id="membership_type" class="display">
163 <th>{ts}Name{/ts}</th>
164 <th>{ts}Period{/ts}</th>
165 <th>{ts}Fixed Start{/ts}</th>
166 <th>{ts}Minimum Fee{/ts}</th>
167 <th>{ts}Duration{/ts}</th>
168 <th>{ts}Visibility{/ts}</th>
172 {foreach from=$membershipTypes item=membershipType}
173 <tr class="{cycle values="odd-row,even-row"} {$membershipType.class} crm-membership">
174 <td class="crm-membership-name">{$membershipType.name}</td>
175 <td class="crm-membership-period_type">{$membershipType.period_type}</td>
176 <td class="crm-membership-fixed_period_start_day">{$membershipType.fixed_period_start_day}</td>
177 <td class="crm-membership-minimum_fee">{$membershipType.minimum_fee}</td>
178 <td class="crm-membership-duration_unit">{$membershipType.duration_unit}</td>
179 <td class="crm-membership-visibility">{$membershipType.visibility}</td>
180 <td>{$membershipType.action|replace:xx:$membershipType.id}</td>
189 {/if} {* End of $action eq 16 - browse memberships. *}