Merge pull request #16629 from WeMoveEU/core-1620
[civicrm-core.git] / templates / CRM / Pledge / Form / Selector.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
1188c7a8 3 | Copyright CiviCRM LLC. All rights reserved. |
6a488035 4 | |
1188c7a8
TO
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 |
6a488035
TO
8 +--------------------------------------------------------------------+
9*}
6a488035 10 {include file="CRM/common/pager.tpl" location="top"}
6a488035 11
3bba4de0
CW
12<p class="description">
13 {ts}Click arrow to view pledge payments.{/ts}
14</p>
6a488035 15{strip}
16850d34 16<table class="selector row-highlight">
6a488035
TO
17 <thead class="sticky">
18 {if ! $single and $context eq 'Search' }
19 <th scope="col" title="Select Rows">{$form.toggleSelect.html}</th>
20 {/if}
6a488035 21 <th></th>
6a488035
TO
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>
d17f7fea 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>
6a488035
TO
43 </td>
44 {if ! $single }
090fdd62 45 <td>{$row.contact_type}</td>
02bc4449 46 <td>
02bc4449
CW
47 <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`"}">{$row.sort_name}</a>
48 </td>
6a488035
TO
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>
6d3864ef 53 <td>{$row.pledge_financial_type}</td>
6a488035
TO
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>
6a488035
TO
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">
13a3d214 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>
6a488035
TO
66 </tr>
67 {/if}
68
69</table>
70{/strip}
71
6a488035 72 {include file="CRM/common/pager.tpl" location="bottom"}
6a488035 73
02bc4449 74{crmScript file='js/crm.expandRow.js'}