Merge pull request #17118 from lcdservices/dev-core-1722
[civicrm-core.git] / templates / CRM / Pledge / Form / Selector.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
4 | |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
9 *}
10 {include file="CRM/common/pager.tpl" location="top"}
11
12 <p class="description">
13 {ts}Click arrow to view pledge payments.{/ts}
14 </p>
15 {strip}
16 <table class="selector row-highlight">
17 <thead class="sticky">
18 {if ! $single and $context eq 'Search' }
19 <th scope="col" title="Select Rows">{$form.toggleSelect.html}</th>
20 {/if}
21 <th></th>
22 {foreach from=$columnHeaders item=header}
23 <th scope="col">
24 {if $header.sort}
25 {assign var='key' value=$header.sort}
26 {$sort->_response.$key.link}
27 {else}
28 {$header.name}
29 {/if}
30 </th>
31 {/foreach}
32 </thead>
33 {counter start=0 skip=1 print=false}
34 {foreach from=$rows item=row}
35 {cycle values="odd-row,even-row" assign=rowClass}
36 <tr id='rowid{$row.pledge_id}' class='{$rowClass} {if $row.pledge_status_name eq 'Overdue' } status-overdue{/if}'>
37 {if $context eq 'Search' }
38 {assign var=cbName value=$row.checkbox}
39 <td>{$form.$cbName.html}</td>
40 {/if}
41 <td>
42 <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>
43 </td>
44 {if ! $single }
45 <td>{$row.contact_type}</td>
46 <td>
47 <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`"}">{$row.sort_name}</a>
48 </td>
49 {/if}
50 <td class="right">{$row.pledge_amount|crmMoney:$row.pledge_currency}</td>
51 <td class="right">{$row.pledge_total_paid|crmMoney:$row.pledge_currency}</td>
52 <td class="right">{$row.pledge_amount-$row.pledge_total_paid|crmMoney:$row.pledge_currency}</td>
53 <td>{$row.pledge_financial_type}</td>
54 <td>{$row.pledge_create_date|truncate:10:''|crmDate}</td>
55 <td>{$row.pledge_next_pay_date|truncate:10:''|crmDate}</td>
56 <td class="right">{$row.pledge_next_pay_amount|crmMoney:$row.pledge_currency}</td>
57 <td>{$row.pledge_status}</td>
58 <td>{$row.action|replace:'xx':$row.pledge_id}</td>
59 </tr>
60 {/foreach}
61
62 {* Dashboard only lists 10 most recent pledges. *}
63 {if $context EQ 'dashboard' and $limit and $pager->_totalItems GT $limit }
64 <tr class="even-row">
65 <td colspan="10"><a href="{crmURL p='civicrm/pledge/search' q='reset=1'}"><i class="crm-i fa-chevron-right" aria-hidden="true"></i> {ts}Find more pledges{/ts}... </a></td>
66 </tr>
67 {/if}
68
69 </table>
70 {/strip}
71
72 {include file="CRM/common/pager.tpl" location="bottom"}
73
74 {crmScript file='js/crm.expandRow.js'}