| 1 | {* |
| 2 | +--------------------------------------------------------------------+ |
| 3 | | CiviCRM version 4.4 | |
| 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 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} |
| 33 | <div id="help"> |
| 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} |
| 40 | {if $rows} |
| 41 | <div id="ltype"> |
| 42 | <p></p> |
| 43 | {strip} |
| 44 | {* handle enable/disable actions*} |
| 45 | {include file="CRM/common/enableDisableApi.tpl"} |
| 46 | {include file="CRM/common/crmeditable.tpl"} |
| 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> |
| 54 | <th>{ts}Financial Type{/ts}</th> |
| 55 | <th>{ts}Min Contribution{/ts}</th> |
| 56 | <th>{ts}Active?{/ts}</th> |
| 57 | <th></th> |
| 58 | </tr> |
| 59 | </thead> |
| 60 | {foreach from=$rows item=row} |
| 61 | <tr id="row_{$row.id}"class="{cycle values="odd-row,even-row"} {$row.class}{if NOT $row.is_active} disabled{/if}"> |
| 62 | <td class="crm-contribution-form-block-name">{$row.name}</td> |
| 63 | <td class="crm-contribution-form-block-sku">{$row.sku}</td> |
| 64 | <td class="crm-contribution-form-block-price">{$row.price }</td> |
| 65 | <td class="crm-contribution-form-block-financial_type">{$row.financial_type_id}</td> |
| 66 | <td class="crm-contribution-form-block-min_contribution">{$row.min_contribution}</td> |
| 67 | <td id="row_{$row.id}_status" >{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> |
| 68 | <td id={$row.id}>{$row.action|replace:'xx':$row.id}</td> |
| 69 | </tr> |
| 70 | {/foreach} |
| 71 | </table> |
| 72 | {/strip} |
| 73 | {if $action ne 1 and $action ne 2} |
| 74 | <div class="action-link"> |
| 75 | <a href="{crmURL q="action=add&reset=1"}" id="newManagePremium" class="button"><span><div class="icon add-icon"></div>{ts}Add Premium{/ts}</span></a> |
| 76 | </div> |
| 77 | {/if} |
| 78 | </div> |
| 79 | {else} |
| 80 | {if $action ne 1 and $action ne 2} |
| 81 | <div class="messages status no-popup"> |
| 82 | <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/> |
| 83 | {capture assign=crmURL}{crmURL p='civicrm/admin/contribute/managePremiums' q="action=add&reset=1"}{/capture} |
| 84 | {ts 1=$crmURL}No premium products have been created for your site. You can <a href='%1'>add one</a>.{/ts} |
| 85 | </div> |
| 86 | {/if} |
| 87 | {/if} |
| 88 | {/if} |
| 89 | {/if} |