Commit | Line | Data |
---|---|---|
6a488035 TO |
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 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*} | |
53 | {include file="CRM/common/enableDisable.tpl"} | |
54 | {include file="CRM/common/jsortable.tpl"} | |
55 | <table id="options" class="display"> | |
56 | <thead> | |
57 | <tr> | |
58 | <th>{ts}Option Label{/ts}</th> | |
59 | <th>{ts}Option Amount{/ts}</th> | |
60 | <th>{ts}Default{/ts}</th> | |
152ff8b9 | 61 | <th>{ts}Financial Type{/ts}</th> |
6a488035 TO |
62 | <th id="order" class="sortable">{ts}Order{/ts}</th> |
63 | <th>{ts}Enabled?{/ts}</th> | |
64 | <th></th> | |
65 | <th class="hiddenElement"></th> | |
66 | </tr> | |
67 | </thead> | |
68 | {foreach from=$customOption item=row} | |
69 | <tr id="row_{$row.id}"class=" crm-price-option crm-price-option_{$row.id} {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}"> | |
70 | <td class="crm-price-option-label">{$row.label}</td> | |
71 | <td class="crm-price-option-value">{$row.amount|crmMoney}</td> | |
72 | <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 | 73 | <td class="nowrap crm-price-option-financial-type-id">{$row.financial_type_id}</td> |
6a488035 TO |
74 | <td class="nowrap crm-price-option-order">{$row.weight}</td> |
75 | <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> | |
76 | <td>{$row.action|replace:'xx':$row.id}</td> | |
77 | <td class="order hiddenElement">{$row.weight}</td> | |
78 | </tr> | |
79 | {/foreach} | |
80 | </tbody> | |
81 | </table> | |
82 | {/strip} | |
83 | {if $addMoreFields && !$isReserved} | |
84 | <div class="action-link"> | |
85 | <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> | |
86 | </div> | |
87 | {/if} | |
88 | </div> | |
89 | ||
90 | {else} | |
91 | {if $action eq 16} | |
92 | <div class="messages status no-popup"> | |
93 | <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/> | |
94 | {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} | |
95 | </div> | |
96 | {/if} | |
97 | {/if} |