| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
*}
-{if $context EQ 'Search'}
{include file="CRM/common/pager.tpl" location="top"}
-{/if}
-{capture assign=iconURL}<img src="{$config->resourceBase}i/TreePlus.gif" alt="{ts}open section{/ts}"/>{/capture}
-{ts 1=$iconURL}Click %1 to view pledge payments.{/ts}
+<p class="description">
+ {ts}Click arrow to view pledge payments.{/ts}
+</p>
{strip}
<table class="selector row-highlight">
<thead class="sticky">
{if ! $single }
{$row.contact_type}<br/>
{/if}
- <span id="{$row.pledge_id}_show">
+ <span id="{$row.pledge_id}_show" title="{ts}Show payments{/ts}">
<a href="#" onclick="cj('#paymentDetails{$row.pledge_id},#minus{$row.pledge_id}_hide,#{$row.pledge_id}_hide').show();
buildPaymentDetails('{$row.pledge_id}','{$row.contact_id}');
cj('#{$row.pledge_id}_show').hide();
- return false;"><img src="{$config->resourceBase}i/TreePlus.gif" class="action-icon" alt="{ts}open section{/ts}"/></a>
+ return false;"><img src="{$config->resourceBase}i/TreePlus.gif" class="action-icon" alt=">"/></a>
</span>
- <span id="minus{$row.pledge_id}_hide">
+ <span id="minus{$row.pledge_id}_hide" title="{ts}Hide payments{/ts}">
<a href="#" onclick="cj('#paymentDetails{$row.pledge_id},#{$row.pledge_id}_hide,#minus{$row.pledge_id}_hide').hide();
cj('#{$row.pledge_id}_show').show();
- return false;"><img src="{$config->resourceBase}i/TreeMinus.gif" class="action-icon" alt="{ts}open section{/ts}"/></a>
+ return false;"><img src="{$config->resourceBase}i/TreeMinus.gif" class="action-icon" alt="^"/></a>
</span>
</td>
{if ! $single }
</table>
{/strip}
-{if $context EQ 'Search'}
{include file="CRM/common/pager.tpl" location="bottom"}
-{/if}
{* Build pledge payment details*}
{literal}
function buildPaymentDetails( pledgeId, contactId )
{
var dataUrl = {/literal}"{crmURL p='civicrm/pledge/payment' h=0 q="action=browse&snippet=4&context=`$context`&pledgeId="}"{literal} + pledgeId + '&cid=' + contactId;
-
- cj.ajax({
- url : dataUrl,
- dataType: "html",
- timeout : 5000, //Time in milliseconds
- success : function( data ){
- cj( '#paymentDetails' + pledgeId ).html( data ).trigger('crmLoad');
- },
- error : function( XMLHttpRequest, textStatus, errorThrown ) {
- console.error( 'Error: '+ textStatus );
- }
- });
+ CRM.loadPage(dataUrl, {target: '#paymentDetails' + pledgeId});
}
</script>
{/literal}