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