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} | |
27 | {include file="CRM/Price/Form/Set.tpl"} | |
28 | {elseif $action eq 1024} | |
29 | {include file="CRM/Price/Form/Preview.tpl"} | |
30 | {elseif $action eq 8 and !$usedBy} | |
31 | {include file="CRM/Price/Form/DeleteSet.tpl"} | |
32 | {else} | |
33 | <div id="help"> | |
34 | {ts}Price sets allow you to set up multiple event registration options with associated fees (e.g. pre-conference workshops, additional meals, etc.). Configure Price Sets for events which need more than a single set of fee levels.{/ts} | |
35 | </div> | |
36 | ||
37 | {if $usedBy} | |
38 | <div class='spacer'></div> | |
39 | <div id="price_set_used_by" class="messages status no-popup"> | |
40 | <div class="icon inform-icon"></div> | |
41 | {if $action eq 8} | |
42 | {ts 1=$usedPriceSetTitle}Unable to delete the '%1' price set - it is currently in use by one or more active events or contribution pages or contributions.{/ts} | |
43 | {/if} | |
44 | ||
45 | {if $usedBy.civicrm_event or $usedBy.civicrm_contribution_page} | |
46 | {include file="CRM/Price/Page/table.tpl"} | |
47 | {/if} | |
48 | </div> | |
49 | {/if} | |
50 | ||
51 | {if $rows} | |
52 | <div id="price_set"> | |
53 | <p></p> | |
54 | {strip} | |
55 | {* handle enable/disable actions*} | |
56 | {include file="CRM/common/enableDisable.tpl"} | |
57 | {include file="CRM/common/jsortable.tpl"} | |
58 | <table id="price_set" class="display crm-price-set-listing"> | |
59 | <thead> | |
60 | <tr> | |
61 | <th id="sortable">{ts}Set Title{/ts}</th> | |
62 | <th id="nosort">{ts}Used For{/ts}</th> | |
63 | <th>{ts}Enabled?{/ts}</th> | |
64 | <th></th> | |
65 | </tr> | |
66 | </thead> | |
67 | {foreach from=$rows item=row} | |
68 | <tr id="row_{$row.id}"class=" crm-price-set crm-price-set_{$row.id} {cycle values="even-row,odd-row"} {$row.class}{if NOT $row.is_active} disabled{/if}"> | |
69 | <td class="crm-price-set-title">{$row.title}</td> | |
70 | <td class="crm-price-set-extends">{$row.extends}</td> | |
71 | <td id="row_{$row.id}_status" class="crm-price-set-is_active">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> | |
72 | <td>{$row.action|replace:'xx':$row.id}</td> | |
73 | </tr> | |
74 | {/foreach} | |
75 | </table> | |
76 | ||
77 | {if NOT ($action eq 1 or $action eq 2) } | |
78 | <div class="action-link"> | |
79 | <a href="{crmURL p='civicrm/admin/price' q="action=add&reset=1"}" id="newPriceSet" class="button"><span><div class="icon add-icon"></div>{ts}Add Set of Price Fields{/ts}</span></a> | |
80 | </div> | |
81 | {/if} | |
82 | ||
83 | {/strip} | |
84 | </div> | |
85 | {else} | |
86 | {if $action ne 1} {* When we are adding an item, we should not display this message *} | |
87 | {capture assign=infoTitle}{ts}No price sets have been added yet.{/ts}{/capture} | |
88 | {assign var="infoType" value="no-popup"} | |
89 | {capture assign=crmURL}{crmURL p='civicrm/admin/price' q='action=add&reset=1'}{/capture} | |
90 | {capture assign=infoMessage}{ts 1=$crmURL}You can <a href='%1'>create one here</a>.{/ts}{/capture} | |
91 | {include file="CRM/common/info.tpl"} | |
92 | {/if} | |
93 | {/if} | |
94 | {/if} |