Commit | Line | Data |
---|---|---|
f9af96d6 PJ |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
819d0d41 | 3 | | CiviCRM version 4.5 | |
f9af96d6 | 4 | +--------------------------------------------------------------------+ |
819d0d41 | 5 | | Copyright CiviCRM LLC (c) 2004-2014 | |
f9af96d6 PJ |
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 | {if $show eq 'event-payment'} | |
27 | {literal} | |
1a0d17b9 | 28 | <script type='text/javascript'> |
3cc60a06 | 29 | CRM.$(function($) { |
0b2b58ea PJ |
30 | if (cj("#payment-info").length) { |
31 | var dataUrl = {/literal}'{crmURL p="civicrm/payment/view" h=0 q="action=browse&id=$participantId&cid=`$contactId`&component=event&context=payment_info&snippet=4"}'{literal}; | |
32 | cj.ajax({ | |
33 | url: dataUrl, | |
34 | async: false, | |
35 | success: function(html) { | |
36 | cj("#payment-info").html(html).trigger('crmLoad'); | |
37 | } | |
38 | }); | |
1a0d17b9 | 39 | |
0b2b58ea PJ |
40 | cj('.total_amount-section').remove(); |
41 | } | |
1a0d17b9 PJ |
42 | }); |
43 | </script> | |
f9af96d6 PJ |
44 | {/literal} |
45 | {/if} | |
46 | {if $context eq 'payment_info'} | |
47 | <table id='info'> | |
48 | <tr class="columnheader"> | |
49 | {if $component eq "event"} | |
50 | <th>{ts}Total Fee(s){/ts}</th> | |
51 | {/if} | |
52 | <th class="right">{ts}Total Paid{/ts}</th> | |
53 | <th class="right">{ts}Balance{/ts}</th> | |
54 | </tr> | |
55 | <tr> | |
56 | <td>{$paymentInfo.total|crmMoney}</td> | |
57 | <td class='right'> | |
58 | {if $paymentInfo.paid > 0} | |
77042884 CW |
59 | {$paymentInfo.paid|crmMoney}<br/> |
60 | <a class="crm-hover-button crm-popup medium-popup" href='{crmURL p="civicrm/payment" q="view=transaction&cid=`$cid`&id=`$paymentInfo.id`&component=`$paymentInfo.component`&action=browse"}'>» {ts}view payments{/ts}</a> | |
f9af96d6 PJ |
61 | {/if} |
62 | </td> | |
63 | <td class='right'>{$paymentInfo.balance|crmMoney}</td> | |
64 | </tr> | |
65 | </table> | |
356579e9 | 66 | {if $paymentInfo.balance and !$paymentInfo.payLater} |
e8cf3013 PJ |
67 | {if $paymentInfo.balance > 0} |
68 | {assign var=paymentButtonName value='Record Payment'} | |
69 | {elseif $paymentInfo.balance < 0} | |
70 | {assign var=paymentButtonName value='Record Refund'} | |
71 | {/if} | |
81f3d017 | 72 | <a class="button" href='{crmURL p="civicrm/payment" q="action=add&reset=1&component=`$component`&id=`$id`&cid=`$cid`"}' title="{ts}{$paymentButtonName}{/ts}"><span><div class="icon add-icon"></div> {ts}{$paymentButtonName}{/ts}</span></a> |
f9af96d6 | 73 | {/if} |
b22f0cad | 74 | {/if} |