Merge pull request #11642 from JKingsnorth/CRM-21739
[civicrm-core.git] / templates / CRM / Contribute / Page / ContributionType.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
2c4c49ca 3 | CiviCRM version 4.7 |
6a488035 4 +--------------------------------------------------------------------+
8c9251b3 5 | Copyright CiviCRM LLC (c) 2004-2018 |
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*}
26{if $action eq 1 or $action eq 2 or $action eq 8}
27 {include file="CRM/Contribute/Form/ContributionType.tpl"}
28{else}
f6eedce7 29 <div class="help">
6a488035
TO
30 <p>{ts}Financial types are used to categorize contributions for reporting and accounting purposes. These are also referred to as <strong>Funds</strong>. You may set up as many types as needed. Each type can carry an accounting code which can be used to map contributions to codes in your accounting system. Commonly used financial types are: Donation, Campaign Contribution, Membership Dues...{/ts}</p>
31 </div>
32
33{if $rows}
34<div id="ltype">
35<p></p>
36 <div class="form-item">
37 {strip}
38 {* handle enable/disable actions*}
4d17a233 39 {include file="CRM/common/enableDisableApi.tpl"}
6a488035
TO
40 <table cellpadding="0" cellspacing="0" border="0">
41 <thead class="sticky">
42 <th>{ts}Name{/ts}</th>
43 <th>{ts}Description{/ts}</th>
44 <th>{ts}Acctg Code{/ts}</th>
45 <th>{ts}Deductible?{/ts}</th>
46 <th>{ts}Reserved?{/ts}</th>
47 <th>{ts}Enabled?{/ts}</th>
48 <th></th>
49 </thead>
50 {foreach from=$rows item=row}
4d17a233 51 <tr id="contribution_type-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
6a488035
TO
52 <td>{$row.name}</td>
53 <td>{$row.description}</td>
54 <td>{$row.accounting_code}</td>
55 <td>{if $row.is_deductible eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
56 <td>{if $row.is_reserved eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
57 <td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
58 <td>{$row.action|replace:'xx':$row.id}</td>
59 </tr>
60 {/foreach}
61 </table>
62 {/strip}
63
6a488035
TO
64 </div>
65</div>
66{else}
67 <div class="messages status no-popup">
68 <div class="icon inform-icon"></div>
e5e8ab99 69 {ts}None found.{/ts}
6a488035
TO
70 </div>
71{/if}
e5e8ab99
CW
72 {if $action ne 1 and $action ne 2}
73 <div class="action-link">
80bc2820
AH
74 {crmButton q="action=add&reset=1" id="newContributionType" icon="plus-circle"}{ts}Add Financial Type{/ts}{/crmButton}
75 {crmButton p="civicrm/admin" q="reset=1" class="cancel" icon="times"}{ts}Done{/ts}{/crmButton}
e5e8ab99
CW
76 </div>
77 {/if}
232624b1 78{/if}