Merge pull request #15281 from mattwire/formatpaymentparams_useprepare
[civicrm-core.git] / templates / CRM / Member / Page / Tab.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
fee14197 3 | CiviCRM version 5 |
6a488035 4 +--------------------------------------------------------------------+
6b83d5bd 5 | Copyright CiviCRM LLC (c) 2004-2019 |
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'}
f6eedce7 38 <div class="help">
6a488035 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">
a2c70872 53 <a accesskey="N" href="{$newURL}" class="button"><span><i class="crm-i fa-plus-circle"></i> {ts}Add Membership{/ts}</span></a>
6a488035 54 {if $accessContribution and $newCredit}
a2c70872 55 <a accesskey="N" href="{$newCreditURL}" class="button"><span><i class="crm-i fa-credit-card"></i> {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">
abe11616 89 {$activeMember.membership_type}{if $activeMember.is_test} ({ts}test{/ts}){/if}
6a488035
TO
90 {if $activeMember.owner_membership_id}<br />({ts}by relationship{/ts}){/if}
91 </td>
21f96d9b
KL
92 <td class="crm-membership-join_date" data-order="{$activeMember.join_date}">{$activeMember.join_date|crmDate}</td>
93 <td class="crm-membership-start_date" data-order="{$activeMember.start_date}">{$activeMember.start_date|crmDate}</td>
94 <td class="crm-membership-end_date" data-order="{$activeMember.end_date}">{$activeMember.end_date|crmDate}</td>
6a488035
TO
95 <td class="crm-membership-status">{$activeMember.status}</td>
96 <td class="crm-membership-source">{$activeMember.source}</td>
6bb529e7
MW
97 <td class="crm-membership-auto_renew">
98 {if $activeMember.auto_renew eq 1}
30773a77 99 <i class="crm-i fa-check" aria-hidden="true" title="{ts}Auto-renew active{/ts}"></i>
6bb529e7 100 {elseif $activeMember.auto_renew eq 2}
30773a77 101 <i class="crm-i fa-ban" aria-hidden="true" title="{ts}Auto-renew error{/ts}"></i>
6bb529e7
MW
102 {/if}
103 </td>
6a488035
TO
104 <td class="crm-membership-related_count">{$activeMember.related_count}</td>
105 <td>
106 {$activeMember.action|replace:'xx':$activeMember.id}
107 {if $activeMember.owner_membership_id}
ba803a65 108 <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="crm-hover-button action-item">{ts}View Primary{/ts}</a>
6a488035
TO
109 {/if}
110 </td>
111 </tr>
112 {/foreach}
113 </table>
114 {/strip}
115 </div>
116 {/if}
117
118 {if $inActiveMembers}
119 <div id="inactive-memberships">
120 <p></p>
121 <h3 class="font-red">{ts}Pending and Inactive Memberships{/ts}</h3>
122 {strip}
123 <table id="pending_membership" class="display">
124 <thead>
125 <tr>
126 <th>{ts}Membership{/ts}</th>
cc8637e1 127 <th>{ts}Member Since{/ts}</th>
6a488035
TO
128 <th>{ts}Start Date{/ts}</th>
129 <th>{ts}End Date{/ts}</th>
130 <th>{ts}Status{/ts}</th>
131 <th>{ts}Source{/ts}</th>
132 <th>{ts}Auto-renew{/ts}</th>
133 <th></th>
134 </tr>
135 </thead>
136 {foreach from=$inActiveMembers item=inActiveMember}
137 <tr id="crm-membership_{$inActiveMember.id}" class="{cycle values="odd-row,even-row"} {$inActiveMember.class} crm-membership">
abe11616
MW
138 <td class="crm-membership-membership_type">
139 {$inActiveMember.membership_type}{if $inActiveMember.is_test} ({ts}test{/ts}){/if}
140 {if $inActiveMember.owner_membership_id}<br />({ts}by relationship{/ts}){/if}
141 </td>
cc8637e1 142 <td class="crm-membership-join_date" data-order="{$inActiveMember.join_date}">{$inActiveMember.join_date|crmDate}</td>
21f96d9b
KL
143 <td class="crm-membership-start_date" data-order="{$inActiveMember.start_date}">{$inActiveMember.start_date|crmDate}</td>
144 <td class="crm-membership-end_date" data-order="{$inActiveMember.end_date}">{$inActiveMember.end_date|crmDate}</td>
6a488035
TO
145 <td class="crm-membership-status">{$inActiveMember.status}</td>
146 <td class="crm-membership-source">{$inActiveMember.source}</td>
6bb529e7
MW
147 <td class="crm-membership-auto_renew">
148 {if $inActiveMember.auto_renew eq 1}
30773a77 149 <i class="crm-i fa-check" aria-hidden="true" title="{ts}Auto-renew active{/ts}"></i>
6bb529e7 150 {elseif $inActiveMember.auto_renew eq 2}
30773a77 151 <i class="crm-i fa-ban" aria-hidden="true" title="{ts}Auto-renew error{/ts}"></i>
6bb529e7
MW
152 {/if}
153 </td>
6a488035
TO
154 <td>{$inActiveMember.action|replace:'xx':$inActiveMember.id}
155 {if $inActiveMember.owner_membership_id}
ba803a65 156 <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="crm-hover-button action-item">{ts}View Primary{/ts}
6a488035
TO
157 </a>
158 {/if}
159 </td>
160 </tr>
161 {/foreach}
162 </table>
163 {/strip}
164 </div>
165 {/if}
166
167 {if $membershipTypes}
168 <div class="solid-border-bottom">&nbsp;</div>
169 <div id="membership-types">
170 <div><label>{ts}Membership Types{/ts}</label></div>
171 <div class="help">
172 {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}
173 <div class="form-item">
174 {strip}
175 <table id="membership_type" class="display">
176 <thead>
177 <tr>
178 <th>{ts}Name{/ts}</th>
179 <th>{ts}Period{/ts}</th>
180 <th>{ts}Fixed Start{/ts}</th>
181 <th>{ts}Minimum Fee{/ts}</th>
182 <th>{ts}Duration{/ts}</th>
183 <th>{ts}Visibility{/ts}</th>
184 <th></th>
185 </tr>
186 </thead>
187 {foreach from=$membershipTypes item=membershipType}
188 <tr class="{cycle values="odd-row,even-row"} {$membershipType.class} crm-membership">
189 <td class="crm-membership-name">{$membershipType.name}</td>
190 <td class="crm-membership-period_type">{$membershipType.period_type}</td>
191 <td class="crm-membership-fixed_period_start_day">{$membershipType.fixed_period_start_day}</td>
192 <td class="crm-membership-minimum_fee">{$membershipType.minimum_fee}</td>
193 <td class="crm-membership-duration_unit">{$membershipType.duration_unit}</td>
194 <td class="crm-membership-visibility">{$membershipType.visibility}</td>
195 <td>{$membershipType.action|replace:xx:$membershipType.id}</td>
196 </tr>
197 {/foreach}
198 </table>
199 {/strip}
200
201 </div>
202 </div>
203 {/if}
204{/if} {* End of $action eq 16 - browse memberships. *}
205</div>