Common.js - pass data with event crmOptionsUpdated
[civicrm-core.git] / templates / CRM / Contribute / Page / PaymentInfo.tpl
CommitLineData
f9af96d6
PJ
1{*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.4 |
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{if $show eq 'event-payment'}
27{literal}
1a0d17b9
PJ
28<script type='text/javascript'>
29cj(function($){
30 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};
31 cj.ajax({
32 url: dataUrl,
33 async: false,
34 success: function(html) {
35 cj("#payment-info").html(html);
36 }
37 });
38
39 cj('.total_amount-section').remove();
40});
41</script>
f9af96d6
PJ
42{/literal}
43{/if}
44{if $context eq 'payment_info'}
45<table id='info'>
46 <tr class="columnheader">
47 {if $component eq "event"}
48 <th>{ts}Total Fee(s){/ts}</th>
49 {/if}
50 <th class="right">{ts}Total Paid{/ts}</th>
51 <th class="right">{ts}Balance{/ts}</th>
52 </tr>
53 <tr>
54 <td>{$paymentInfo.total|crmMoney}</td>
55 <td class='right'>
56 {if $paymentInfo.paid > 0}
81f3d017 57 <a class='action-item' href='{crmURL p="civicrm/payment" q="view=transaction&cid=`$cid`&id=`$paymentInfo.id`&component=`$paymentInfo.component`&action=browse"}'>{$paymentInfo.paid|crmMoney}<br/>>> view payments</a>
f9af96d6
PJ
58 {/if}
59 </td>
60 <td class='right'>{$paymentInfo.balance|crmMoney}</td>
61 </tr>
62</table>
e8cf3013
PJ
63{if $paymentInfo.balance}
64 {if $paymentInfo.balance > 0}
65 {assign var=paymentButtonName value='Record Payment'}
66 {elseif $paymentInfo.balance < 0}
67 {assign var=paymentButtonName value='Record Refund'}
68 {/if}
81f3d017 69 <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 70{/if}
f9af96d6 71{/if}