Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
819d0d41 | 3 | | CiviCRM version 4.5 | |
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 CW |
30 | <div id="help"> |
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/setup"} | |
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 CW |
41 | {include file="CRM/common/enableDisableApi.tpl"} |
42 | {include file="CRM/common/crmeditable.tpl"} | |
6a488035 TO |
43 | <table cellpadding="0" cellspacing="0" border="0"> |
44 | <thead class="sticky"> | |
45 | <th>{ts}Status{/ts}</th> | |
46 | <th>{ts}Start Event{/ts}</th> | |
47 | <th>{ts}End Event{/ts}</th> | |
48 | <th>{ts}Member{/ts}</th> | |
49 | <th>{ts}Admin{/ts}</th> | |
50 | <th>{ts}Weight{/ts}</th> | |
51 | <th>{ts}Enabled?{/ts}</th> | |
52 | <th></th> | |
53 | </thead> | |
54 | {foreach from=$rows item=row} | |
4d17a233 CW |
55 | <tr id="membership_status-{$row.id}" class="crm-entity {cycle values="odd-row,even-row"} {$row.class} {if NOT $row.is_active} disabled{/if} crm-membership-status"> |
56 | <td class="crm-membership-status-label crm-editable" data-field="label">{$row.label}</td> | |
6a488035 TO |
57 | <td class="crm-membership-status-start_event">{$row.start_event}</td> |
58 | <td class="crm-membership-status-end_event">{$row.end_event}</td> | |
59 | <td class="crm-membership-status-is_current_member">{if $row.is_current_member eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> | |
60 | <td class="crm-membership-status-is_admin">{if $row.is_admin eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> | |
61 | <td class="nowrap crm-membership-status-weight">{$row.weight}</td> | |
62 | <td id="row_{$row.id}_status" class="crm-membership-status-is_active">{if $row.is_active eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td> | |
63 | <td>{$row.action|replace:'xx':$row.id}</td> | |
64 | </tr> | |
65 | {/foreach} | |
66 | </table> | |
67 | {/strip} | |
68 | ||
69 | {if $action ne 1 and $action ne 2} | |
70 | <div class="action-link"> | |
71 | <a href="{crmURL q="action=add&reset=1"}" id="newMembershipStatus" class="button"><span><div class="icon add-icon"></div>{ts}Add Membership Status{/ts}</span></a> | |
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} |