Import from SVN (r45945, r596)
[civicrm-core.git] / templates / CRM / Financial / Page / FinancialTypeAccount.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.3 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2013 |
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/Financial/Form/FinancialTypeAccount.tpl"}
28 {else}
29 {if $rows}
30 <div id="ltype">
31 <div class="form-item">
32 {if $action ne 1 and $action ne 2}
33 <div class="action-link">
34 <a href="{crmURL q="action=add&reset=1&aid=$aid"}" id="newfinancialTypeAccount" class="button"><span><div class="icon add-icon"></div>{ts}Assign Account{/ts}</span></a>
35 <a href="{crmURL p="civicrm/admin/financial/financialType" q="action=update&id=`$aid`&reset=1"}" class="button"><span><div class="icon edit-icon"></div>{ts}Edit Financial Type{/ts}</span></a>
36 </div>
37 {/if}
38 {strip}
39 {* handle enable/disable actions*}
40 {include file="CRM/common/enableDisable.tpl"}
41 <table cellpadding="0" cellspacing="0" border="0">
42 <thead class="sticky">
43 <th>{ts}Financial Account{/ts}</th>
44 <th>{ts}Relationship{/ts}</th>
45 <th>{ts}Accounting Code{/ts}</th>
46 <th>{ts}Account Type (Code){/ts}</th>
47 <th>{ts}Owned By{/ts}</th>
48 <th>{ts}Is Active?{/ts}</th>
49 <th></th>
50 </thead>
51 {foreach from=$rows item=row}
52 <tr id="row_{$row.id}"class="{cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
53 <td>{$row.financial_account}</td>
54 <td>{$row.account_relationship}</td>
55 <td>{$row.accounting_code}</td>
56 <td>{$row.financial_account_type}{if $row.account_type_code} ({$row.account_type_code}){/if}</td>
57 <td>{$row.owned_by}</td>
58 <td id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
59 <td>{$row.action|replace:'xx':$row.id}</td>
60 </tr>
61 {/foreach}
62 </table>
63 {/strip}
64
65 {if $action ne 1 and $action ne 2}
66 <div class="action-link">
67 <a href="{crmURL q="action=add&reset=1&aid=$aid"}" id="newfinancialTypeAccount" class="button"><span><div class="icon add-icon"></div>{ts}Assign Account{/ts}</span></a>
68 <a href="{crmURL p="civicrm/admin/financial/financialType" q="action=update&id=`$aid`&reset=1"}" class="button"><span><div class="icon edit-icon"></div>{ts}Edit Financial Type{/ts}</span></a>
69 </div>
70 {/if}
71 </div>
72 </div>
73 {else}
74 <div class="messages status">
75 <div class="icon inform-icon"></div>
76 {capture assign=crmURL}{crmURL q="action=add&reset=1&aid=$aid"}{/capture}
77 {ts 1=$crmURL}There are no financial accounts assigned to this financial type. You can <a href='%1'>assign one</a>.{/ts}
78 </div>
79 {/if}
80 {/if}