Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
fee14197 | 3 | | CiviCRM version 5 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
6b83d5bd | 5 | | Copyright CiviCRM LLC (c) 2004-2019 | |
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 8 or $action eq 1024} | |
27 | {include file="CRM/Contribute/Form/ManagePremiums.tpl"} | |
28 | {else} | |
29 | ||
30 | ||
31 | {if $action ne 2} | |
32 | {if $action ne 1 or $action ne 8} | |
f6eedce7 | 33 | <div class="help"> |
6a488035 TO |
34 | {capture assign=contribURL}{crmURL p='civicrm/admin/contribute' q="reset=1"}{/capture} |
35 | <p>{ts}CiviContribute allows you to configure any number of <strong>Premiums</strong> which can be offered to contributors as incentives / thank-you gifts. Premiums may be tangible items (i.e. a coffee mug or t-shirt), or they may be a membership or subscription with a pre-determined duration.{/ts}</p> | |
36 | <p>{ts 1=$contribURL}Use this section to enter and update all premiums that you want to offer on any of your Online Contribution pages. Then you can assign one or more premiums to a specific Contribution page from <a href='%1'>Configure Online Contribution Pages</a> <strong>» Configure » Premiums</strong>.{/ts}</p> | |
37 | </div> | |
38 | ||
39 | {/if} | |
036aa39d MR |
40 | |
41 | <div class="crm-content-block crm-block"> | |
6a488035 TO |
42 | {if $rows} |
43 | <div id="ltype"> | |
6a488035 TO |
44 | {strip} |
45 | {* handle enable/disable actions*} | |
da6b7c62 | 46 | {include file="CRM/common/enableDisableApi.tpl"} |
6a488035 TO |
47 | {include file="CRM/common/jsortable.tpl"} |
48 | <table id="options" class="display"> | |
49 | <thead> | |
50 | <tr> | |
51 | <th id="sortable">{ts}Name{/ts}</th> | |
52 | <th>{ts}SKU{/ts}</th> | |
53 | <th>{ts}Market Value{/ts}</th> | |
6a488035 | 54 | <th>{ts}Min Contribution{/ts}</th> |
da6b7c62 MW |
55 | <th>{ts}Actual Cost{/ts}</th> |
56 | <th>{ts}Financial Type{/ts}</th> | |
6a488035 TO |
57 | <th>{ts}Active?{/ts}</th> |
58 | <th></th> | |
59 | </tr> | |
60 | </thead> | |
61 | {foreach from=$rows item=row} | |
7d9f50a2 CW |
62 | <tr id="product-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}"> |
63 | <td class="crm-contribution-form-block-name crm-editable" data-field="name">{$row.name}</td> | |
64 | <td class="crm-contribution-form-block-sku crm-editable" data-field="sku">{$row.sku}</td> | |
da6b7c62 MW |
65 | <td class="crm-contribution-form-block-price">{$row.price|crmMoney}</td> |
66 | <td class="crm-contribution-form-block-min_contribution">{$row.min_contribution|crmMoney}</td> | |
67 | <td class="crm-contribution-form-block-cost">{$row.cost|crmMoney}</td> | |
68 | <td class="crm-contribution-form-block-financial_type">{$row.financial_type}</td> | |
6a488035 TO |
69 | <td id="row_{$row.id}_status" >{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> |
70 | <td id={$row.id}>{$row.action|replace:'xx':$row.id}</td> | |
036aa39d | 71 | </tr> |
6a488035 TO |
72 | {/foreach} |
73 | </table> | |
74 | {/strip} | |
75 | {if $action ne 1 and $action ne 2} | |
76 | <div class="action-link"> | |
80bc2820 | 77 | {crmButton q="action=add&reset=1" id="newManagePremium" icon="plus-circle"}{ts}Add Premium{/ts}{/crmButton} |
6a488035 TO |
78 | </div> |
79 | {/if} | |
80 | </div> | |
81 | {else} | |
82 | {if $action ne 1 and $action ne 2} | |
83 | <div class="messages status no-popup"> | |
84 | <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/> | |
85 | {capture assign=crmURL}{crmURL p='civicrm/admin/contribute/managePremiums' q="action=add&reset=1"}{/capture} | |
86 | {ts 1=$crmURL}No premium products have been created for your site. You can <a href='%1'>add one</a>.{/ts} | |
87 | </div> | |
88 | {/if} | |
89 | {/if} | |
036aa39d | 90 | </div> |
6a488035 | 91 | {/if} |
232624b1 | 92 | {/if} |