CRM-16189, added link on contribution edit form to record payment for pending pay...
[civicrm-core.git] / templates / CRM / Contribute / Page / PaymentInfo.tpl
index 2080ff0b55ec8a9ed7adbfc05002671aae17d50b..6a0c8019a7f5d840acdde1278d10e590137aeee8 100644 (file)
  | see the CiviCRM license FAQ at http://civicrm.org/licensing        |
  +--------------------------------------------------------------------+
 *}
-{if $show eq 'event-payment'}
+{if $show eq 'payments'}
 {literal}
 <script type='text/javascript'>
 CRM.$(function($) {
   if ($("#payment-info").length) {
-    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};
+    var dataUrl = {/literal}'{crmURL p="civicrm/payment/view" h=0 q="action=browse&id=$componentId&cid=`$contactId`&component=$component&context=payment_info&snippet=4"}'{literal};
     $.ajax({
       url: dataUrl,
       async: false,
@@ -54,6 +54,8 @@ CRM.$(function($) {
   <tr class="columnheader">
     {if $component eq "event"}
       <th>{ts}Total Fee(s){/ts}</th>
+    {else}
+      <th>{ts}Contribution Amount(s){/ts}</th>
     {/if}
     <th class="right">{ts}Total Paid{/ts}</th>
     <th class="right">{ts}Balance{/ts}</th>
@@ -62,17 +64,20 @@ CRM.$(function($) {
     <td>{$paymentInfo.total|crmMoney}</td>
     <td class='right'>
       {if $paymentInfo.paid > 0}
-        {$paymentInfo.paid|crmMoney}<br/>
-        <a class="crm-hover-button action-item crm-popup medium-popup" href='{crmURL p="civicrm/payment" q="view=transaction&cid=`$cid`&id=`$paymentInfo.id`&component=`$paymentInfo.component`&action=browse"}'>
-          <i class="crm-i fa-list"></i>
-          {ts}view payments{/ts}
-        </a>
+        {$paymentInfo.paid|crmMoney}
+               {if  !$hideButtonLinks}
+          <br/>
+          <a class="crm-hover-button action-item crm-popup medium-popup" href='{crmURL p="civicrm/payment" q="view=transaction&cid=`$cid`&id=`$paymentInfo.id`&component=`$paymentInfo.component`&action=browse"}'>
+            <i class="crm-i fa-list"></i>
+            {ts}view payments{/ts}
+          </a>
+        {/if}
       {/if}
     </td>
     <td class="right" id="payment-info-balance" data-balance="{$paymentInfo.balance}">{$paymentInfo.balance|crmMoney}</td>
   </tr>
 </table>
-{if $paymentInfo.balance and !$paymentInfo.payLater}
+{if $paymentInfo.balance and !$paymentInfo.payLater && !$hideButtonLinks}
   {if $paymentInfo.balance > 0}
      {assign var=paymentButtonName value='Record Payment'}
   {elseif $paymentInfo.balance < 0}