Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
39de6fd5 | 3 | | CiviCRM version 4.6 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
819d0d41 | 5 | | Copyright CiviCRM LLC (c) 2004-2014 | |
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 | {capture assign=crmURL}{crmURL p='civicrm/admin/member/membershipStatus' q="action=add&reset=1"}{/capture} | |
27 | {if $action eq 1 or $action eq 2 or $action eq 8} | |
28 | {include file="CRM/Member/Form/MembershipStatus.tpl"} | |
29 | {else} | |
236b1b2d | 30 | <div id="help"> |
b5fd43ab | 31 | <p>{ts}CiviMember automatically calculates the current status of each contact's membership based on the status names and rules configured here. The status 'rule' tells CiviMember what status to assign based on the start and end dates of a given membership. For example, the default <strong>Grace</strong> status rule says: 'assign Grace status if the membership period ended sometime within the past month.'{/ts} {docURL page="user/membership/defining-memberships/"} |
236b1b2d CW |
32 | <p>{ts 1=$crmURL}The status rules provided by default may be sufficient for your organization. However, you can easily change the status names and/or adjust the rules by clicking the Edit links below. Or you can <a href='%1'>add a new status and rule</a>.{/ts} |
33 | </div> | |
6a488035 | 34 | |
236b1b2d CW |
35 | {if $rows} |
36 | <div id="ltype"> | |
37 | <p></p> | |
6a488035 TO |
38 | <div id="membership_status_id"> |
39 | {strip} | |
40 | {* handle enable/disable actions*} | |
4d17a233 | 41 | {include file="CRM/common/enableDisableApi.tpl"} |
6a488035 TO |
42 | <table cellpadding="0" cellspacing="0" border="0"> |
43 | <thead class="sticky"> | |
44 | <th>{ts}Status{/ts}</th> | |
45 | <th>{ts}Start Event{/ts}</th> | |
46 | <th>{ts}End Event{/ts}</th> | |
47 | <th>{ts}Member{/ts}</th> | |
48 | <th>{ts}Admin{/ts}</th> | |
b633f8bd CW |
49 | <th>{ts}Order{/ts}</th> |
50 | <th>{ts}Reserved?{/ts}</th> | |
6a488035 TO |
51 | <th></th> |
52 | </thead> | |
53 | {foreach from=$rows item=row} | |
b633f8bd CW |
54 | <tr id="membership_status-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class} {if NOT $row.is_active} disabled{/if} crmf"> |
55 | <td class="crmf-label crm-editable" >{$row.label}</td> | |
56 | <td class="crmf-start_event crm-editable" data-type="select" data-empty-option="{ts}- none -{/ts}">{$row.start_event}</td> | |
57 | <td class="crmf-end_event crm-editable" data-type="select" data-empty-option="{ts}- none -{/ts}">{$row.end_event}</td> | |
58 | <td class="crmf-is_current_member crm-editable" data-type="boolean">{if $row.is_current_member eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> | |
59 | <td class="crmf-is_admin crm-editable" data-type="boolean">{if $row.is_admin eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> | |
60 | <td class="nowrap crmf-weight">{$row.weight}</td> | |
61 | <td class="crmf-is_reserved">{if $row.is_reserved eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> | |
6a488035 TO |
62 | <td>{$row.action|replace:'xx':$row.id}</td> |
63 | </tr> | |
64 | {/foreach} | |
65 | </table> | |
66 | {/strip} | |
67 | ||
68 | {if $action ne 1 and $action ne 2} | |
e5e8ab99 | 69 | <div class="action-link"> |
52604b19 | 70 | <a href="{crmURL q="action=add&reset=1"}" id="newMembershipStatus" class="button"><span><div class="icon ui-icon-circle-plus"></div>{ts}Add Membership Status{/ts}</span></a> |
e5e8ab99 | 71 | <a href="{crmURL p="civicrm/admin" q="reset=1"}" class="button cancel no-popup"><span><div class="icon ui-icon-close"></div> {ts}Done{/ts}</span></a> |
6a488035 TO |
72 | </div> |
73 | {/if} | |
74 | </div> | |
236b1b2d CW |
75 | </div> |
76 | {else} | |
77 | {if $action ne 1} | |
78 | <div class="messages status no-popup"> | |
6a488035 | 79 | <img src="{$config->resourceBase}i/Inform.gif" alt="{ts}status{/ts}"/>{ts 1=$crmURL}There are no custom membership status entered. You can <a href='%1'>add one</a>.{/ts} |
236b1b2d CW |
80 | </div> |
81 | {/if} | |
6a488035 TO |
82 | {/if} |
83 | {/if} |