Merge pull request #13462 from greenpeace-cee/alter-indexes
[civicrm-core.git] / templates / CRM / Contribute / Form / Selector.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
fee14197 3 | CiviCRM version 5 |
6a488035 4 +--------------------------------------------------------------------+
6b83d5bd 5 | Copyright CiviCRM LLC (c) 2004-2019 |
6a488035
TO
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*}
d0e79cbd 26{include file="CRM/common/pager.tpl" location="top"}
6a488035
TO
27
28{strip}
9806f96d 29 <div class="crm-contact-contribute-contributions">
b99a793c
CW
30 <table class="selector row-highlight">
31 <thead class="sticky">
32 <tr>
33 {if !$single and $context eq 'Search' }
6a488035 34 <th scope="col" title="Select Rows">{$form.toggleSelect.html}</th>
b99a793c 35 {/if}
94d4ec02 36 {if !$single}
e06c650c 37 <th scope="col"></th>
94d4ec02 38 {/if}
b99a793c 39 {foreach from=$columnHeaders item=header}
6a488035 40 <th scope="col">
b99a793c
CW
41 {if $header.sort}
42 {assign var='key' value=$header.sort}
43 {$sort->_response.$key.link}
44 {else}
45 {$header.name}
46 {/if}
6a488035 47 </th>
b99a793c
CW
48 {/foreach}
49 </tr>
50 </thead>
d4c0653f 51
b99a793c
CW
52 {counter start=0 skip=1 print=false}
53 {foreach from=$rows item=row}
54 <tr id="rowid{$row.contribution_id}" class="{cycle values="odd-row,even-row"} {if $row.cancel_date} cancelled{/if} crm-contribution_{$row.contribution_id}">
55 {if !$single }
56 {if $context eq 'Search' }
57 {assign var=cbName value=$row.checkbox}
58 <td>{$form.$cbName.html}</td>
59 {/if}
e06c650c
MR
60 <td>{$row.contact_type}</td>
61 <td><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`"}">{$row.sort_name}</a></td>
6a488035 62 {/if}
b99a793c 63 <td class="crm-contribution-amount">
8f7c2652 64 <a class="nowrap bold crm-expand-row" title="{ts}view payments{/ts}" href="{crmURL p='civicrm/payment' q="view=transaction&component=contribution&action=browse&cid=`$row.contact_id`&id=`$row.contribution_id`&selector=1"}">
65 &nbsp; {$row.total_amount|crmMoney:$row.currency}
66 </a>
b99a793c 67 {if $row.amount_level }<br/>({$row.amount_level}){/if}
2e80df5b 68 {if $row.contribution_recur_id}<br/>{ts}(Recurring){/ts}{/if}
b99a793c 69 </td>
4fb5fcf3 70 {foreach from=$columnHeaders item=column}
71 {assign var='columnName' value=$column.field_name}
72 {if !$columnName}{* if field_name has not been set skip, this helps with not changing anything not specifically edited *}
73 {elseif $columnName === 'total_amount'}{* rendered above as soft credit columns = confusing *}
74 {elseif $column.type === 'actions'}{* rendered below as soft credit column handling = not fixed *}
75 {elseif $columnName == 'contribution-status'}
76 <td class="crm-contribution-status">
77 {$row.contribution_status}<br/>
78 {if $row.cancel_date}
79 {$row.cancel_date|crmDate}
80 {/if}
81 </td>
82 {else}
83 {if $column.type == 'date'}
84 <td class="crm-contribution-{$columnName}">
85 {$row.$columnName|crmDate}
86 </td>
87 {else}
88 <td class="crm-{$columnName} crm-{$columnName}_{$row.columnName}">
89 {$row.$columnName}
90 </td>
b99a793c 91 {/if}
4fb5fcf3 92 {/if}
93 {/foreach}
b99a793c
CW
94 {if $softCreditColumns}
95 <td class="crm-contribution-soft_credit_name">
96 <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contribution_soft_credit_contact_id`"}">{$row.contribution_soft_credit_name}</a>
97 </td>
98 <td class="crm-contribution-soft_credit_type">{$row.contribution_soft_credit_type}</td>
99 {/if}
100 <td>{$row.action|replace:'xx':$row.contribution_id}</td>
101 </tr>
102 {/foreach}
6a488035 103
b99a793c 104 </table>
9806f96d 105 </div>
6a488035
TO
106{/strip}
107
d0e79cbd 108{include file="CRM/common/pager.tpl" location="bottom"}
64967ca1 109{crmScript file='js/crm.expandRow.js'}