Merge pull request #23979 from eileenmcnaughton/act_status
[civicrm-core.git] / templates / CRM / Price / Page / Set.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 4}
11 {include file="CRM/Price/Form/Set.tpl"}
12 {elseif $action eq 1024}
13 {include file="CRM/Price/Form/Preview.tpl"}
14 {elseif $action eq 8 and !$usedBy}
15 {include file="CRM/Price/Form/DeleteSet.tpl"}
16 {else}
17 <div class="help">
18 {ts}Price sets allow you to set up flexible multi-option pricing schemes for your contribution, event and membership pages. Use a price set if the standard pricing options are insufficient for your needs.{/ts}
19 </div>
20
21 {if $usedBy}
22 <div class='spacer'></div>
23 <div id="price_set_used_by" class="messages status no-popup">
24 {icon icon="fa-info-circle"}{/icon}
25 {if $action eq 8}
26 {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 or event templates.{/ts}
27 {/if}
28
29 {if $usedBy.civicrm_event or $usedBy.civicrm_contribution_page or $usedBy.civicrm_event_template}
30 {include file="CRM/Price/Page/table.tpl"}
31 {/if}
32 </div>
33 {/if}
34
35 {if $rows}
36 <div id="price_set" class="crm-content-block crm-block">
37 {strip}
38 {* handle enable/disable actions*}
39 {include file="CRM/common/enableDisableApi.tpl"}
40 {include file="CRM/common/jsortable.tpl"}
41 <table id="price_set" class="display crm-price-set-listing">
42 <thead>
43 <tr>
44 <th id="sortable">{ts}Set Title{/ts}</th>
45 <th id="nosort">{ts}Used For{/ts}</th>
46 <th>{ts}Enabled?{/ts}</th>
47 <th></th>
48 </tr>
49 </thead>
50 {foreach from=$rows item=row}
51 <tr id="price_set-{$row.id}" class="crm-entity crm-price-set_{$row.id} {cycle values="even-row,odd-row"}{if !empty($row.class)} {$row.class}{/if}{if NOT $row.is_active} disabled{/if}">
52 <td class="crmf-title crm-editable">{$row.title}</td>
53 <td class="crmf-extends">{$row.extends}</td>
54 <td class="crmf-is_active">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
55 <td>{$row.action|smarty:nodefaults|replace:'xx':$row.id}</td>
56 </tr>
57 {/foreach}
58 </table>
59
60 {if NOT ($action eq 1 or $action eq 2) }
61 <div class="action-link">
62 {crmButton p='civicrm/admin/price' q="action=add&reset=1" id="newPriceSet" icon="plus-circle"}{ts}Add Set of Price Fields{/ts}{/crmButton}
63 </div>
64 {/if}
65
66 {/strip}
67 </div>
68 {else}
69 {if $action ne 1} {* When we are adding an item, we should not display this message *}
70 {capture assign=infoTitle}{ts}No price sets have been added yet.{/ts}{/capture}
71 {assign var="infoType" value="no-popup"}
72 {capture assign=crmURL}{crmURL p='civicrm/admin/price' q='action=add&reset=1'}{/capture}
73 {capture assign=infoMessage}{ts 1=$crmURL}You can <a href='%1'>create one here</a>.{/ts}{/capture}
74 {include file="CRM/common/info.tpl"}
75 {/if}
76 {/if}
77 {/if}