| 1 | {* |
| 2 | +--------------------------------------------------------------------+ |
| 3 | | CiviCRM version 4.5 | |
| 4 | +--------------------------------------------------------------------+ |
| 5 | | Copyright CiviCRM LLC (c) 2004-2014 | |
| 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 | |
| 27 | {capture assign=reminderLink}{crmURL p='civicrm/admin/scheduleReminders' q='reset=1'}{/capture} |
| 28 | <div id="help"> |
| 29 | <p><div class="icon inform-icon"></div> {ts}Membership types are used to categorize memberships. You can define an unlimited number of types. Each type incorporates a 'name' (Gold Member, Honor Society Member...), a description, a minimum fee (can be $0), and a duration (can be 'lifetime'). Each member type is specifically linked to the membership entity (organization) - e.g. Bay Area Chapter.{/ts} {docURL page="user/membership/setup"}</p> |
| 30 | <p>{ts 1=$reminderLink}Configure membership renewal reminders using <a href="%1">Schedule Reminders</a>.{/ts} {docURL page="user/email/scheduled-reminders"}</p> |
| 31 | </div> |
| 32 | |
| 33 | {if $rows} |
| 34 | <div id="membership_type"> |
| 35 | {strip} |
| 36 | {* handle enable/disable actions*} |
| 37 | {include file="CRM/common/enableDisableApi.tpl"} |
| 38 | {include file="CRM/common/crmeditable.tpl"} |
| 39 | {include file="CRM/common/jsortable.tpl"} |
| 40 | <table id="options" class="display"> |
| 41 | <thead> |
| 42 | <tr> |
| 43 | <th>{ts}Membership{/ts}</th> |
| 44 | <th>{ts}Period{/ts}</th> |
| 45 | <th>{ts}Fixed Start{/ts}</th> |
| 46 | <th>{ts}Minimum Fee{/ts}</th> |
| 47 | <th>{ts}Duration{/ts}</th> |
| 48 | <th>{ts}Auto-renew Option{/ts}</th> |
| 49 | <th>{ts}Related{/ts}</th> |
| 50 | <th>{ts}Max{/ts}</th> |
| 51 | <th>{ts}Visibility{/ts}</th> |
| 52 | <th id="order" class="sortable">{ts}Order{/ts}</th> |
| 53 | <th>{ts}Enabled?{/ts}</th> |
| 54 | <th></th> |
| 55 | <th class="hiddenElement"></th> |
| 56 | </tr> |
| 57 | </thead> |
| 58 | {foreach from=$rows item=row} |
| 59 | <tr id="membership_type-{$row.id}" class="crm-entity {cycle values='odd-row,even-row'} {$row.class} crm-membership-type {if NOT $row.is_active} disabled{/if}"> |
| 60 | <td class="crm-membership-type-type_name crm-editable" data-field="name">{$row.name}</td> |
| 61 | <td class="crm-memberhip-type-period_type">{$row.period_type}</td> |
| 62 | <td class="crm-membership-type-fixed_period_start_day">{$row.fixed_period_start_day}</td> |
| 63 | <td class="crm-membership-type-minimum_fee" align="right">{$row.minimum_fee|crmMoney}</td> |
| 64 | <td class="crm-membership-type-duration_interval_unit">{$row.duration_interval} {$row.duration_unit}</td> |
| 65 | <td class="crm-membership-type-auto-renew">{if $row.auto_renew EQ 2}{ts}Required{/ts}{elseif $row.auto_renew EQ 1}{ts}Optional{/ts}{else}{ts}No{/ts}{/if}</td> |
| 66 | <td class="crm-membership-type-relationship_type_name">{$row.relationshipTypeName}</td> |
| 67 | <td class="crm-membership-type-max_related" align="right">{$row.maxRelated}</td> |
| 68 | <td class="crm-membership-type-visibility">{$row.visibility}</td> |
| 69 | <td class="nowrap crm-membership_type-order">{$row.order}</td> |
| 70 | <td class="crm-membership-type-status_{$row.id}" id="row_{$row.id}_status">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> |
| 71 | <td>{$row.action|replace:'xx':$row.id}</td> |
| 72 | <td class="order hiddenElement">{$row.weight}</td> |
| 73 | </tr> |
| 74 | {/foreach} |
| 75 | </table> |
| 76 | {/strip} |
| 77 | |
| 78 | {if $action ne 1 and $action ne 2} |
| 79 | <div class="action-link"> |
| 80 | <a href="{crmURL p='civicrm/admin/member/membershipType/add' q="action=add&reset=1"}" id="newMembershipType" class="button"><span><div class="icon add-icon"></div>{ts}Add Membership Type{/ts}</span></a> |
| 81 | </div> |
| 82 | {/if} |
| 83 | </div> |
| 84 | {else} |
| 85 | {if $action ne 1} |
| 86 | <div class="messages status no-popup"> |
| 87 | <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/> |
| 88 | {capture assign=crmURL}{crmURL p='civicrm/admin/member/membershipType/add' q="action=add&reset=1"}{/capture}{ts 1=$crmURL}There are no membership types entered. You can <a href='%1'>add one</a>.{/ts} |
| 89 | </div> |
| 90 | {/if} |
| 91 | {/if} |