f02c92a3ab52faa8b63c5fe7c51c7b774882f857
[civicrm-core.git] / templates / CRM / Pledge / Form / Selector.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.7 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2016 |
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 {include file="CRM/common/pager.tpl" location="top"}
27
28 <p class="description">
29 {ts}Click arrow to view pledge payments.{/ts}
30 </p>
31 {strip}
32 <table class="selector row-highlight">
33 <thead class="sticky">
34 {if ! $single and $context eq 'Search' }
35 <th scope="col" title="Select Rows">{$form.toggleSelect.html}</th>
36 {/if}
37 {if $single}
38 <th></th>
39 {/if}
40 {foreach from=$columnHeaders item=header}
41 <th scope="col">
42 {if $header.sort}
43 {assign var='key' value=$header.sort}
44 {$sort->_response.$key.link}
45 {else}
46 {$header.name}
47 {/if}
48 </th>
49 {/foreach}
50 </thead>
51 {counter start=0 skip=1 print=false}
52 {foreach from=$rows item=row}
53 {cycle values="odd-row,even-row" assign=rowClass}
54 <tr id='rowid{$row.pledge_id}' class='{$rowClass} {if $row.pledge_status_name eq 'Overdue' } status-overdue{/if}'>
55 {if $context eq 'Search' }
56 {assign var=cbName value=$row.checkbox}
57 <td>{$form.$cbName.html}</td>
58 {/if}
59 <td>
60 <a class="crm-expand-row" title="{ts}view payments{/ts}" href="{crmURL p='civicrm/pledge/payment' q="action=browse&context=`$context`&pledgeId=`$row.pledge_id`&cid=`$row.contact_id`"}"></a>
61 </td>
62 {if ! $single }
63 <td>
64 {$row.contact_type} &nbsp;
65 <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`"}">{$row.sort_name}</a>
66 </td>
67 {/if}
68 <td class="right">{$row.pledge_amount|crmMoney:$row.pledge_currency}</td>
69 <td class="right">{$row.pledge_total_paid|crmMoney:$row.pledge_currency}</td>
70 <td class="right">{$row.pledge_amount-$row.pledge_total_paid|crmMoney:$row.pledge_currency}</td>
71 <td>{$row.pledge_financial_type}</td>
72 <td>{$row.pledge_create_date|truncate:10:''|crmDate}</td>
73 <td>{$row.pledge_next_pay_date|truncate:10:''|crmDate}</td>
74 <td class="right">{$row.pledge_next_pay_amount|crmMoney:$row.pledge_currency}</td>
75 <td>{$row.pledge_status}</td>
76 <td>{$row.action|replace:'xx':$row.pledge_id}</td>
77 </tr>
78 {/foreach}
79
80 {* Dashboard only lists 10 most recent pledges. *}
81 {if $context EQ 'dashboard' and $limit and $pager->_totalItems GT $limit }
82 <tr class="even-row">
83 <td colspan="10"><a href="{crmURL p='civicrm/pledge/search' q='reset=1'}">&raquo; {ts}Find more pledges{/ts}... </a></td>
84 </tr>
85 {/if}
86
87 </table>
88 {/strip}
89
90 {include file="CRM/common/pager.tpl" location="bottom"}
91
92 {crmScript file='js/crm.expandRow.js'}