Import from SVN (r45945, r596)
[civicrm-core.git] / templates / CRM / Pledge / Page / Payment.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.3 |
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 $action eq 2 } {* update *}
27 {include file="CRM/Pledge/Form/Payment.tpl"}
28{else}
29{if $context eq 'dashboard'}{assign var='context' value='pledgeDashboard'}{/if}
30<table class="nestedSelector">
31 <tr class="columnheader">
32 <th>{ts}Amount Due{/ts}</th>
33 <th>{ts}Due Date{/ts}</th>
34 <th>{ts}Amount Paid{/ts}</th>
35 <th>{ts}Paid Date{/ts}</th>
36 <th>{ts}Last Reminder{/ts}</th>
37 <th>{ts}Reminders Sent{/ts}</th>
38 <th colspan="2">{ts}Status{/ts}</th>
39 </tr>
40
41 {foreach from=$rows item=row}
42 <tr class="{cycle values="odd-row,even-row"} {if $row.status eq 'Overdue' } status-overdue{/if}">
43 <td class="right">{$row.scheduled_amount|crmMoney:$row.currency}</td>
44 <td>{$row.scheduled_date|truncate:10:''|crmDate}</td>
45 <td class="right">{$row.total_amount|crmMoney:$row.currency}</td>
46 <td>{$row.receive_date|truncate:10:''|crmDate}</td>
47 <td>{$row.reminder_date|truncate:10:''|crmDate}</td>
48 <td class="right">{if $row.reminder_count}{$row.reminder_count}{/if}</td>
49 <td {if ! ($permission EQ 'edit' and ($row.status eq 'Pending' or $row.status eq 'Overdue' or $row.status eq 'Completed')) } colspan="2"{/if} >{$row.label}</td>
50{if $context neq user}
51 {if $permission EQ 'edit' and ($row.status eq 'Pending' or $row.status eq 'Overdue' or $row.status eq 'Completed') }
52 <td>
53 {if $row.status eq 'Completed'} {* Link to view contribution record for completed payment.*}
54 {capture assign=viewContribURL}{crmURL p="civicrm/contact/view/contribution" q="reset=1&id=`$row.contribution_id`&cid=`$contactId`&action=view&context=`$context`"}{/capture}
55 {ts 1=$viewContribURL}<a href='%1'>View Payment</a>{/ts}
56 {else} {* Links to record / submit a payment. *}
57 {capture assign=newContribURL}{crmURL p="civicrm/contact/view/contribution" q="reset=1&action=add&cid=`$contactId`&context=`$context`&ppid=`$row.id`"}{/capture}
58 {ts 1=$newContribURL}<a href='%1'>Record Payment (Check, Cash, EFT ...)</a>{/ts}
59 {if $newCredit}
60 <br/>
61 {capture assign=newCreditURL}{crmURL p="civicrm/contact/view/contribution" q="reset=1&action=add&cid=`$contactId`&ppid=`$row.id`&context=`$context`&mode=live"}{/capture}
62 {ts 1=$newCreditURL}<a href='%1'>Submit Credit Card Payment</a>{/ts}
63 {/if}
64 <br/>
65 {capture assign=editURL}{crmURL p="civicrm/pledge/payment" q="reset=1&action=update&cid=`$contactId`&context=`$context`&ppId=`$row.id`"}{/capture}
66 {ts 1=$editURL}<a href='%1'>Edit Scheduled Payment</a>{/ts}
67 {/if}
68 </td>
69 {/if}
70{/if}
71 </tr>
72 {/foreach}
73</table>
74{/if}