59732c8231b503aea7b116cb2fcf5f43b856ea45
[civicrm-core.git] / templates / CRM / Financial / Page / FinancialTypeAccount.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 {if $action eq 1 or $action eq 2 or $action eq 8}
11 {include file="CRM/Financial/Form/FinancialTypeAccount.tpl"}
12 {else}
13 {if $rows}
14 <div id="ltype">
15 <div class="form-item">
16 {if $action ne 1 and $action ne 2}
17 <div class="action-link">
18 {crmButton q="action=add&reset=1&aid=$aid" id="newfinancialTypeAccount" icon="plus-circle"}{ts}Assign Account{/ts}{/crmButton}
19 {crmButton p="civicrm/admin/financial/financialType" q="action=update&id=`$aid`&reset=1" icon="pencil"}{ts}Edit Financial Type{/ts}{/crmButton}
20 </div>
21 {/if}
22 {strip}
23 {* handle enable/disable actions*}
24 {include file="CRM/common/enableDisableApi.tpl"}
25 <table cellpadding="0" cellspacing="0" border="0">
26 <thead class="sticky">
27 <th>{ts}Relationship{/ts}</th>
28 <th>{ts}Financial Account{/ts}</th>
29 <th>{ts}Accounting Code{/ts}</th>
30 <th>{ts}Account Type (Code){/ts}</th>
31 <th>{ts}Owned By{/ts}</th>
32 <th>{ts}Is Active?{/ts}</th>
33 <th></th>
34 </thead>
35 {foreach from=$rows item=row}
36 <tr id="row_{$row.id}"class="{cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
37 <td>{$row.account_relationship}</td>
38 <td>{$row.financial_account}</td>
39 <td>{$row.accounting_code}</td>
40 <td>{$row.financial_account_type}{if $row.account_type_code} ({$row.account_type_code}){/if}</td>
41 <td>{$row.owned_by}</td>
42 <td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
43 <td>{$row.action|replace:'xx':$row.id}</td>
44 </tr>
45 {/foreach}
46 </table>
47 {/strip}
48
49 {if $action ne 1 and $action ne 2}
50 <div class="action-link">
51 {crmButton q="action=add&reset=1&aid=$aid" id="newfinancialTypeAccount" icon="plus-circle"}{ts}Assign Account{/ts}{/crmButton}
52 {crmButton p="civicrm/admin/financial/financialType" q="action=update&id=`$aid`&reset=1" icon="pencil"}{ts}Edit Financial Type{/ts}{/crmButton}
53 </div>
54 {/if}
55 </div>
56 </div>
57 {else}
58 <div class="messages status no-popup">
59 <div class="icon inform-icon"></div>
60 {capture assign=crmURL}{crmURL q="action=add&reset=1&aid=$aid"}{/capture}
61 {ts 1=$crmURL}There are no financial accounts assigned to this financial type. You can <a href='%1'>assign one</a>.{/ts}
62 </div>
63 {/if}
64 {/if}