Import from SVN (r45945, r596)
[civicrm-core.git] / templates / CRM / Member / Page / Tab.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.3 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2013 |
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 *}
34 {if $permission EQ 'edit'}{capture assign=newURL}{crmURL p="civicrm/contact/view/membership" q="reset=1&action=add&cid=`$contactId`&context=membership"}{/capture}{/if}
35
36 {if $action ne 1 and $action ne 2 and $permission EQ 'edit'}
37 <div id="help">
38 {if $permission EQ 'edit'}
39 {ts 1=$newURL}Click <a href='%1'>Add Membership</a> to record a new membership.{/ts}
40 {if $newCredit}
41 {capture assign=newCreditURL}{crmURL p="civicrm/contact/view/membership" q="reset=1&action=add&cid=`$contactId`&context=membership&mode=live"}{/capture}
42 {ts 1=$newCreditURL}Click <a href='%1'>Submit Credit Card Membership</a> to process a Membership on behalf of the member using their credit card.{/ts}
43 {/if}
44 {else}
45 {ts 1=$displayName}Current and inactive memberships for %1 are listed below.{/ts}
46 {/if}
47 </div>
48
49 <div class="action-link">
50 <a accesskey="N" href="{$newURL}" class="button"><span><div class="icon add-icon"></div>{ts}Add Membership{/ts}</span></a>
51 {if $accessContribution and $newCredit}
52 <a accesskey="N" href="{$newCreditURL}" class="button"><span><div class="icon add-icon"></div>{ts}Submit Credit Card Membership{/ts}</span></a><br /><br />
53 {else}
54 <br/ ><br/ >
55 {/if}
56 </div>
57 {/if}
58 {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}
59 <div class="messages status no-popup">
60 <div class="icon inform-icon"></div>
61 {ts}No memberships have been recorded for this contact.{/ts}
62 </div>
63 {/if}
64 {include file="CRM/common/jsortable.tpl"}
65 {if $activeMembers}
66 <div id="memberships">
67 <h3>{ts}Active Memberships{/ts}</h3>
68 {strip}
69 <table id="active_membership" class="display">
70 <thead>
71 <tr>
72 <th>{ts}Membership{/ts}</th>
73 <th>{ts}Member Since{/ts}</th>
74 <th>{ts}Start Date{/ts}</th>
75 <th>{ts}End Date{/ts}</th>
76 <th>{ts}Status{/ts}</th>
77 <th>{ts}Source{/ts}</th>
78 <th>{ts}Auto-renew{/ts}</th>
79 <th>{ts}Related{/ts}</th>
80 <th></th>
81 </tr>
82 </thead>
83 {foreach from=$activeMembers item=activeMember}
84 <tr id="crm-membership_{$activeMember.id}" class="{cycle values="odd-row,even-row"} {$activeMember.class} crm-membership">
85 <td class="crm-membership-membership_type">
86 {$activeMember.membership_type}
87 {if $activeMember.owner_membership_id}<br />({ts}by relationship{/ts}){/if}
88 </td>
89 <td class="crm-membership-join_date">{$activeMember.join_date|crmDate}</td>
90 <td class="crm-membership-start_date">{$activeMember.start_date|crmDate}</td>
91 <td class="crm-membership-end_date">{$activeMember.end_date|crmDate}</td>
92 <td class="crm-membership-status">{$activeMember.status}</td>
93 <td class="crm-membership-source">{$activeMember.source}</td>
94 <td class="crm-membership-auto_renew">{if $activeMember.auto_renew}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Auto-renew{/ts}" /> {/if}</td>
95 <td class="crm-membership-related_count">{$activeMember.related_count}</td>
96 <td>
97 {$activeMember.action|replace:'xx':$activeMember.id}
98 {if $activeMember.owner_membership_id}
99 <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>
100 {/if}
101 </td>
102 </tr>
103 {/foreach}
104 </table>
105 {/strip}
106 </div>
107 {/if}
108
109 {if $inActiveMembers}
110 <div id="inactive-memberships">
111 <p></p>
112 <h3 class="font-red">{ts}Pending and Inactive Memberships{/ts}</h3>
113 {strip}
114 <table id="pending_membership" class="display">
115 <thead>
116 <tr>
117 <th>{ts}Membership{/ts}</th>
118 <th>{ts}Start Date{/ts}</th>
119 <th>{ts}End Date{/ts}</th>
120 <th>{ts}Status{/ts}</th>
121 <th>{ts}Source{/ts}</th>
122 <th>{ts}Auto-renew{/ts}</th>
123 <th></th>
124 </tr>
125 </thead>
126 {foreach from=$inActiveMembers item=inActiveMember}
127 <tr id="crm-membership_{$inActiveMember.id}" class="{cycle values="odd-row,even-row"} {$inActiveMember.class} crm-membership">
128 <td class="crm-membership-membership_type">{$inActiveMember.membership_type}
129 {if $inActiveMember.owner_membership_id}<br />({ts}by relationship{/ts}){/if}
130 </td>
131 <td class="crm-membership-start_date">{$inActiveMember.start_date|crmDate}</td>
132 <td class="crm-membership-end_date">{$inActiveMember.end_date|crmDate}</td>
133 <td class="crm-membership-status">{$inActiveMember.status}</td>
134 <td class="crm-membership-source">{$inActiveMember.source}</td>
135 <td class="crm-membership-auto_renew">{if $inActiveMember.auto_renew}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Auto-renew{/ts}" /> {/if}</td>
136 <td>{$inActiveMember.action|replace:'xx':$inActiveMember.id}
137 {if $inActiveMember.owner_membership_id}
138 <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}
139 </a>
140 {/if}
141 </td>
142 </tr>
143 {/foreach}
144 </table>
145 {/strip}
146 </div>
147 {/if}
148
149 {if $membershipTypes}
150 <div class="solid-border-bottom">&nbsp;</div>
151 <div id="membership-types">
152 <div><label>{ts}Membership Types{/ts}</label></div>
153 <div class="help">
154 {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}
155 <div class="form-item">
156 {strip}
157 <table id="membership_type" class="display">
158 <thead>
159 <tr>
160 <th>{ts}Name{/ts}</th>
161 <th>{ts}Period{/ts}</th>
162 <th>{ts}Fixed Start{/ts}</th>
163 <th>{ts}Minimum Fee{/ts}</th>
164 <th>{ts}Duration{/ts}</th>
165 <th>{ts}Visibility{/ts}</th>
166 <th></th>
167 </tr>
168 </thead>
169 {foreach from=$membershipTypes item=membershipType}
170 <tr class="{cycle values="odd-row,even-row"} {$membershipType.class} crm-membership">
171 <td class="crm-membership-name">{$membershipType.name}</td>
172 <td class="crm-membership-period_type">{$membershipType.period_type}</td>
173 <td class="crm-membership-fixed_period_start_day">{$membershipType.fixed_period_start_day}</td>
174 <td class="crm-membership-minimum_fee">{$membershipType.minimum_fee}</td>
175 <td class="crm-membership-duration_unit">{$membershipType.duration_unit}</td>
176 <td class="crm-membership-visibility">{$membershipType.visibility}</td>
177 <td>{$membershipType.action|replace:xx:$membershipType.id}</td>
178 </tr>
179 {/foreach}
180 </table>
181 {/strip}
182
183 </div>
184 </div>
185 {/if}
186{/if} {* End of $action eq 16 - browse memberships. *}
187</div>