Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
39de6fd5 | 3 | | CiviCRM version 4.6 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
819d0d41 | 5 | | Copyright CiviCRM LLC (c) 2004-2014 | |
6a488035 TO |
6 | +--------------------------------------------------------------------+ |
7 | | This file is a part of CiviCRM. | | |
8 | | | | |
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. | | |
12 | | | | |
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. | | |
17 | | | | |
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 | +--------------------------------------------------------------------+ | |
25 | *} | |
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"} | |
29 | {elseif $action eq 4} | |
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 *} | |
2c407361 CW |
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} | |
6a488035 TO |
36 | |
37 | {if $action ne 1 and $action ne 2 and $permission EQ 'edit'} | |
38 | <div id="help"> | |
39 | {if $permission EQ 'edit'} | |
a1c7d42f | 40 | {capture assign="link"}class="action-item" href="{$newURL}"{/capture} |
2c407361 | 41 | {ts 1=$link}Click <a %1>Add Membership</a> to record a new membership.{/ts} |
6a488035 | 42 | {if $newCredit} |
2c407361 | 43 | {capture assign=newCreditURL}{crmURL p="civicrm/contact/view/membership" q="reset=1&action=add&cid=`$contactId`&context=membership&mode=live"}{/capture} |
a1c7d42f | 44 | {capture assign="link"}class="action-item" href="{$newCreditURL}"{/capture} |
2c407361 | 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} |
6a488035 TO |
46 | {/if} |
47 | {else} | |
48 | {ts 1=$displayName}Current and inactive memberships for %1 are listed below.{/ts} | |
49 | {/if} | |
50 | </div> | |
51 | ||
52 | <div class="action-link"> | |
52604b19 | 53 | <a accesskey="N" href="{$newURL}" class="button"><span><div class="icon ui-icon-circle-plus"></div>{ts}Add Membership{/ts}</span></a> |
6a488035 | 54 | {if $accessContribution and $newCredit} |
52604b19 | 55 | <a accesskey="N" href="{$newCreditURL}" class="button"><span><div class="icon ui-icon-circle-plus"></div>{ts}Submit Credit Card Membership{/ts}</span></a><br /><br /> |
6a488035 TO |
56 | {else} |
57 | <br/ ><br/ > | |
58 | {/if} | |
59 | </div> | |
60 | {/if} | |
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} | |
65 | </div> | |
66 | {/if} | |
67 | {include file="CRM/common/jsortable.tpl"} | |
68 | {if $activeMembers} | |
69 | <div id="memberships"> | |
70 | <h3>{ts}Active Memberships{/ts}</h3> | |
71 | {strip} | |
72 | <table id="active_membership" class="display"> | |
73 | <thead> | |
74 | <tr> | |
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> | |
83 | <th></th> | |
84 | </tr> | |
85 | </thead> | |
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} | |
91 | </td> | |
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> | |
99 | <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> | |
103 | {/if} | |
104 | </td> | |
105 | </tr> | |
106 | {/foreach} | |
107 | </table> | |
108 | {/strip} | |
109 | </div> | |
110 | {/if} | |
111 | ||
112 | {if $inActiveMembers} | |
113 | <div id="inactive-memberships"> | |
114 | <p></p> | |
115 | <h3 class="font-red">{ts}Pending and Inactive Memberships{/ts}</h3> | |
116 | {strip} | |
117 | <table id="pending_membership" class="display"> | |
118 | <thead> | |
119 | <tr> | |
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> | |
126 | <th></th> | |
127 | </tr> | |
128 | </thead> | |
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} | |
133 | </td> | |
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} | |
142 | </a> | |
143 | {/if} | |
144 | </td> | |
145 | </tr> | |
146 | {/foreach} | |
147 | </table> | |
148 | {/strip} | |
149 | </div> | |
150 | {/if} | |
151 | ||
152 | {if $membershipTypes} | |
153 | <div class="solid-border-bottom"> </div> | |
154 | <div id="membership-types"> | |
155 | <div><label>{ts}Membership Types{/ts}</label></div> | |
156 | <div class="help"> | |
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"> | |
159 | {strip} | |
160 | <table id="membership_type" class="display"> | |
161 | <thead> | |
162 | <tr> | |
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> | |
169 | <th></th> | |
170 | </tr> | |
171 | </thead> | |
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> | |
181 | </tr> | |
182 | {/foreach} | |
183 | </table> | |
184 | {/strip} | |
185 | ||
186 | </div> | |
187 | </div> | |
188 | {/if} | |
189 | {/if} {* End of $action eq 16 - browse memberships. *} | |
190 | </div> |