CRM-14377 minor fix and improvement in SC and PCP panes in Contribution Form
[civicrm-core.git] / templates / CRM / Contribute / Form / ContributionView.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
819d0d41 3 | CiviCRM version 4.5 |
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="crm-block crm-content-block crm-contribution-view-form-block">
27<h3>{ts}View Contribution{/ts}</h3>
3bd06df9 28
6a488035 29<div class="action-link">
3bd06df9 30 <div class="crm-submit-buttons">
6a488035 31 {if call_user_func(array('CRM_Core_Permission','check'), 'edit contributions')}
3bd06df9
KJ
32 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context"}
33 {if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey}
34 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context&key=$searchKey"}
35 {/if}
36 <a class="button" href="{crmURL p='civicrm/contact/view/contribution' q=$urlParams}" accesskey="e"><span>
37 <div class="icon edit-icon"></div>{ts}Edit{/ts}</span>
38 </a>
6a488035
TO
39 {/if}
40 {if call_user_func(array('CRM_Core_Permission','check'), 'delete in CiviContribute')}
3bd06df9
KJ
41 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context"}
42 {if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey}
43 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context&key=$searchKey"}
44 {/if}
45 <a class="button" href="{crmURL p='civicrm/contact/view/contribution' q=$urlParams}"><span>
46 <div class="icon delete-icon"></div>{ts}Delete{/ts}</span>
47 </a>
6a488035
TO
48 {/if}
49 {include file="CRM/common/formButtons.tpl" location="top"}
3bd06df9 50 </div>
6a488035
TO
51</div>
52<table class="crm-info-panel">
3bd06df9
KJ
53 <tr>
54 <td class="label">{ts}From{/ts}</td>
55 <td class="bold">{$displayName}</td>
56 </tr>
57 <tr>
58 <td class="label">{ts}Financial Type{/ts}</td>
59 <td>{$financial_type}{if $is_test} {ts}(test){/ts} {/if}</td>
60 </tr>
61 {if $lineItem}
6a488035 62 <tr>
3bd06df9
KJ
63 <td class="label">{ts}Contribution Amount{/ts}</td>
64 <td>{include file="CRM/Price/Page/LineItem.tpl" context="Contribution"}
65 {if $contribution_recur_id}
66 <strong>{ts}Recurring Contribution{/ts}</strong>
67 <br/>
68 {ts}Installments{/ts}: {if $recur_installments}{$recur_installments}{else}{ts}(ongoing){/ts}{/if}, {ts}Interval{/ts}: {$recur_frequency_interval} {$recur_frequency_unit}(s)
69 {/if}
70 </td>
6a488035 71 </tr>
3bd06df9 72 {else}
6a488035 73 <tr>
3bd06df9
KJ
74 <td class="label">{ts}Total Amount{/ts}</td>
75 <td><strong>{$total_amount|crmMoney:$currency}</strong>&nbsp;
76 {if $contribution_recur_id}
77 <strong>{ts}Recurring Contribution{/ts}</strong>
78 <br/>
79 {ts}Installments{/ts}: {if $recur_installments}{$recur_installments}{else}{ts}(ongoing){/ts}{/if}, {ts}Interval{/ts}: {$recur_frequency_interval} {$recur_frequency_unit}(s)
80 {/if}
81 </td>
6a488035 82 </tr>
3bd06df9
KJ
83 {/if}
84 {if $non_deductible_amount}
6a488035 85 <tr>
3bd06df9
KJ
86 <td class="label">{ts}Non-deductible Amount{/ts}</td>
87 <td>{$non_deductible_amount|crmMoney:$currency}</td>
6a488035 88 </tr>
6a488035
TO
89 {/if}
90 {if $fee_amount}
3bd06df9
KJ
91 <tr>
92 <td class="label">{ts}Fee Amount{/ts}</td>
93 <td>{$fee_amount|crmMoney:$currency}</td>
94 </tr>
6a488035
TO
95 {/if}
96 {if $net_amount}
3bd06df9
KJ
97 <tr>
98 <td class="label">{ts}Net Amount{/ts}</td>
99 <td>{$net_amount|crmMoney:$currency}</td>
100 </tr>
6a488035
TO
101 {/if}
102
103 <tr>
3bd06df9
KJ
104 <td class="label">{ts}Received{/ts}</td>
105 <td>{if $receive_date}{$receive_date|crmDate}{else}({ts}not available{/ts}){/if}</td>
6a488035 106 </tr>
3bd06df9
KJ
107 {if $to_financial_account }
108 <tr>
109 <td class="label">{ts}Received Into{/ts}</td>
110 <td>{$to_financial_account}</td>
111 </tr>
112 {/if}
6a488035 113 <tr>
3bd06df9
KJ
114 <td class="label">{ts}Contribution Status{/ts}</td>
115 <td {if $contribution_status_id eq 3} class="font-red bold"{/if}>{$contribution_status}
6a488035
TO
116 {if $contribution_status_id eq 2} {if $is_pay_later}: {ts}Pay Later{/ts} {else} : {ts}Incomplete Transaction{/ts} {/if}{/if}</td>
117 </tr>
118
119 {if $cancel_date}
3bd06df9
KJ
120 <tr>
121 <td class="label">{ts}Cancelled / Refunded Date{/ts}</td>
122 <td>{$cancel_date|crmDate}</td>
123 </tr>
124 {if $cancel_reason}
125 <tr>
126 <td class="label">{ts}Cancellation / Refund Reason{/ts}</td>
127 <td>{$cancel_reason}</td>
128 </tr>
129 {/if}
6a488035
TO
130 {/if}
131 <tr>
3bd06df9
KJ
132 <td class="label">{ts}Paid By{/ts}</td>
133 <td>{$payment_instrument}</td>
6a488035
TO
134 </tr>
135
136 {if $payment_instrument eq 'Check'|ts}
3bd06df9
KJ
137 <tr>
138 <td class="label">{ts}Check Number{/ts}</td>
139 <td>{$check_number}</td>
140 </tr>
6a488035
TO
141 {/if}
142 <tr>
3bd06df9
KJ
143 <td class="label">{ts}Source{/ts}</td>
144 <td>{$source}</td>
6a488035
TO
145 </tr>
146
147 {if $campaign}
3bd06df9 148 <tr>
6a488035 149 <td class="label">{ts}Campaign{/ts}</td>
3bd06df9
KJ
150 <td>{$campaign}</td>
151 </tr>
6a488035
TO
152 {/if}
153
154 {if $contribution_page_title}
3bd06df9
KJ
155 <tr>
156 <td class="label">{ts}Online Contribution Page{/ts}</td>
157 <td>{$contribution_page_title}</td>
158 </tr>
159 {/if}
6a488035 160 {if $receipt_date}
3bd06df9
KJ
161 <tr>
162 <td class="label">{ts}Receipt Sent{/ts}</td>
163 <td>{$receipt_date|crmDate}</td>
164 </tr>
6a488035
TO
165 {/if}
166 {foreach from=$note item="rec"}
167 {if $rec }
3bd06df9
KJ
168 <tr>
169 <td class="label">{ts}Note{/ts}</td>
170 <td>{$rec}</td>
171 </tr>
6a488035
TO
172 {/if}
173 {/foreach}
174
175 {if $trxn_id}
3bd06df9
KJ
176 <tr>
177 <td class="label">{ts}Transaction ID{/ts}</td>
178 <td>{$trxn_id}</td>
179 </tr>
6a488035
TO
180 {/if}
181
182 {if $invoice_id}
3bd06df9
KJ
183 <tr>
184 <td class="label">{ts}Invoice ID{/ts}</td>
185 <td>{$invoice_id}&nbsp;</td>
186 </tr>
6a488035
TO
187 {/if}
188
6a488035 189 {if $thankyou_date}
3bd06df9
KJ
190 <tr>
191 <td class="label">{ts}Thank-you Sent{/ts}</td>
192 <td>{$thankyou_date|crmDate}</td>
193 </tr>
6a488035 194 {/if}
2020b311 195</table>
6a488035 196
b6545333 197{if count($softContributions)} {* We show soft credit name with PCP section if contribution is linked to a PCP. *}
48762c66 198 <div class="crm-accordion-wrapper crm-soft-credit-pane">
3bd06df9
KJ
199 <div class="crm-accordion-header">
200 {ts}Soft Credit{/ts}
2020b311 201 </div>
3bd06df9 202 <div class="crm-accordion-body">
48762c66 203 <table class="crm-info-panel crm-soft-credit-listing">
b6545333 204 {foreach from=$softContributions item="softCont"}
7ccf8829
KJ
205 <tr>
206 <td>
207 <a href="{crmURL p="civicrm/contact/view" q="reset=1&cid=`$softCont.contact_id`"}"
48762c66 208 title="{ts}View contact record{/ts}">{$softCont.contact_name}
7ccf8829
KJ
209 </a>
210 </td>
51fa20cb 211 <td>{$softCont.amount|crmMoney:$currency}
212 {if $softCont.soft_credit_type_label}
213 ({$softCont.soft_credit_type_label})
214 {/if}
215 </td>
7ccf8829 216 </tr>
3bd06df9
KJ
217 {/foreach}
218 </table>
219 </div>
220 </div>
221{/if}
6a488035
TO
222
223{if $premium}
3bd06df9
KJ
224 <div class="crm-accordion-wrapper ">
225 <div class="crm-accordion-header">
226 {ts}Premium Information{/ts}
227 </div>
228 <div class="crm-accordion-body">
229 <table class="crm-info-panel">
230 <td class="label">{ts}Premium{/ts}</td>
231 <td>{$premium}</td>
232 <td class="label">{ts}Option{/ts}</td>
233 <td>{$option}</td>
234 <td class="label">{ts}Fulfilled{/ts}</td>
235 <td>{$fulfilled|truncate:10:''|crmDate}</td>
236 </table>
6a488035 237 </div>
3bd06df9 238 </div>
6a488035
TO
239{/if}
240
241{if $pcp_id}
3bd06df9
KJ
242 <div id='PCPView' class="crm-accordion-wrapper ">
243 <div class="crm-accordion-header">
244 {ts}Personal Campaign Page Contribution Information{/ts}
6a488035 245 </div>
3bd06df9
KJ
246 <div class="crm-accordion-body">
247 <table class="crm-info-panel">
248 <tr>
249 <td class="label">{ts}Personal Campaign Page{/ts}</td>
b6545333 250 <td><a href="{crmURL p="civicrm/pcp/info" q="reset=1&id=`$pcp_id`"}">{$pcp_title}</a><br/>
3bd06df9
KJ
251 <span class="description">{ts}Contribution was made through this personal campaign page.{/ts}</span>
252 </td>
253 </tr>
254 <tr>
255 <td class="label">{ts}Soft Credit To{/ts}</td>
b6545333 256 <td><a href="{crmURL p="civicrm/contact/view" q="reset=1&cid=`$pcp_soft_credit_to_id`"}" id="view_contact"
257 title="{ts}View contact record{/ts}">{$pcp_soft_credit_to_name}</a></td>
3bd06df9
KJ
258 </tr>
259 <tr>
260 <td class="label">{ts}In Public Honor Roll?{/ts}</td>
261 <td>{if $pcp_display_in_roll}{ts}Yes{/ts}{else}{ts}No{/ts}{/if}</td>
262 </tr>
263 {if $pcp_roll_nickname}
264 <tr>
265 <td class="label">{ts}Honor Roll Name{/ts}</td>
266 <td>{$pcp_roll_nickname}</td>
267 </tr>
268 {/if}
269 {if $pcp_personal_note}
270 <tr>
271 <td class="label">{ts}Personal Note{/ts}</td>
272 <td>{$pcp_personal_note}</td>
273 </tr>
274 {/if}
275 </table>
276 </div>
277 </div>
6a488035
TO
278{/if}
279
280{include file="CRM/Custom/Page/CustomDataView.tpl"}
281
282{if $billing_address}
3bd06df9
KJ
283 <fieldset>
284 <legend>{ts}Billing Address{/ts}</legend>
285 <div class="form-item">
286 {$billing_address|nl2br}
287 </div>
288 </fieldset>
6a488035
TO
289{/if}
290
291<div class="crm-submit-buttons">
3bd06df9
KJ
292 {if call_user_func(array('CRM_Core_Permission','check'), 'edit contributions')}
293 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context"}
294 {if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey}
295 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context&key=$searchKey"}
6a488035 296 {/if}
3bd06df9
KJ
297 <a class="button" href="{crmURL p='civicrm/contact/view/contribution' q=$urlParams}" accesskey="e"><span><div
298 class="icon edit-icon"></div>{ts}Edit{/ts}</span></a>
299 {/if}
300 {if call_user_func(array('CRM_Core_Permission','check'), 'delete in CiviContribute')}
301 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context"}
302 {if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey}
303 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context&key=$searchKey"}
6a488035 304 {/if}
3bd06df9
KJ
305 <a class="button" href="{crmURL p='civicrm/contact/view/contribution' q=$urlParams}"><span><div
306 class="icon delete-icon"></div>{ts}Delete{/ts}</span></a>
307 {/if}
308 {include file="CRM/common/formButtons.tpl" location="bottom"}
6a488035
TO
309</div>
310</div>