VAT-414 The system public pages should be updated to show the VAT/Tax breakdown for...
[civicrm-core.git] / templates / CRM / Price / Page / Option.tpl
CommitLineData
6a488035
TO
1{*
2 +--------------------------------------------------------------------+
819d0d41 3 | CiviCRM version 4.5 |
6a488035 4 +--------------------------------------------------------------------+
819d0d41 5 | Copyright CiviCRM LLC (c) 2004-2014 |
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 4 or $action eq 8 and !$usedBy) and !$isReserved}
27 {include file="CRM/Price/Form/Option.tpl"}
28{/if}
29
30{if $usedBy}
31 <div class='spacer'></div>
32 <div id="price_set_used_by" class="messages status no-popup">
33 <div class="icon inform-icon"></div>
34 {if $action eq 8}
35 {ts 1=$usedPriceSetTitle}Unable to delete the '%1' Price Field Option - it is currently in use by one or more active events or contribution pages or contributions.{/ts}
36 {/if}
37
38 {if $usedBy.civicrm_event or $usedBy.civicrm_contribution_page}
39 {include file="CRM/Price/Page/table.tpl"}
40 {/if}
41
42 </div>
43 {/if}
44
45
46
47{if $customOption}
48
49 <div id="field_page">
50 <p></p>
51 {strip}
52 {* handle enable/disable actions*}
4d17a233
CW
53 {include file="CRM/common/enableDisableApi.tpl"}
54 {include file="CRM/common/crmeditable.tpl"}
6a488035
TO
55 {include file="CRM/common/jsortable.tpl"}
56 <table id="options" class="display">
57 <thead>
58 <tr>
59 <th>{ts}Option Label{/ts}</th>
60 <th>{ts}Option Amount{/ts}</th>
61 <th>{ts}Default{/ts}</th>
152ff8b9 62 <th>{ts}Financial Type{/ts}</th>
6a488035 63 <th id="order" class="sortable">{ts}Order{/ts}</th>
a32709be
PB
64 {if $getTaxDetails}
65 <th>{ts}Tax Label{/ts}</th>
66 <th>{ts}Tax Amount{/ts}</th>
67 {/if}
6a488035
TO
68 <th>{ts}Enabled?{/ts}</th>
69 <th></th>
70 <th class="hiddenElement"></th>
71 </tr>
72 </thead>
73 {foreach from=$customOption item=row}
60158442 74 <tr id="price_field_value-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}">
4d17a233 75 <td class="crm-price-option-label crm-editable" data-field="label">{$row.label}</td>
6a488035
TO
76 <td class="crm-price-option-value">{$row.amount|crmMoney}</td>
77 <td class="crm-price-option-is_default">{if $row.is_default}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Default{/ts}" />{/if}</td>
152ff8b9 78 <td class="nowrap crm-price-option-financial-type-id">{$row.financial_type_id}</td>
6a488035 79 <td class="nowrap crm-price-option-order">{$row.weight}</td>
a32709be
PB
80 {if $getTaxDetails}
81 <td>{if $row.tax_rate != '' }
82 {if $row.tax_rate == 0.00}
83 VAT(Exempt)
84 {else}
85 VAT({$row.tax_rate|string_format:"%.2f"}%)
86 {/if}
87 {/if}</td>
88 <td>{$row.tax_amount|crmMoney}</td>
89 {/if}
6a488035
TO
90 <td id="row_{$row.id}_status" class="crm-price-option-is_active">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
91 <td>{$row.action|replace:'xx':$row.id}</td>
92 <td class="order hiddenElement">{$row.weight}</td>
93 </tr>
94 {/foreach}
95 </tbody>
96 </table>
97 {/strip}
98 {if $addMoreFields && !$isReserved}
99 <div class="action-link">
100 <a href="{crmURL q="reset=1&action=add&fid=$fid&sid=$sid"}" class="button"><span><div class="icon add-icon"></div> {ts 1=$fieldTitle}New Option for '%1'{/ts}</span></a>
101 </div>
102 {/if}
103 </div>
104
105{else}
106 {if $action eq 16}
107 <div class="messages status no-popup">
108 <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>
109 {capture assign=crmURL}{crmURL p='civicrm/admin/price/field/option' q="action=add&fid=$fid&sid=$sid"}{/capture}{ts 1=$fieldTitle 2=$crmURL}There are no options for the price field '%1', <a href='%2'>add one</a>.{/ts}
110 </div>
111 {/if}
112{/if}