Merge pull request #15953 from eileenmcnaughton/export_bom2
[civicrm-core.git] / templates / CRM / Member / Page / MembershipStatus.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
4 | |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
9 *}
10 {capture assign=crmURL}{crmURL p='civicrm/admin/member/membershipStatus' q="action=add&reset=1"}{/capture}
11 {if $action eq 1 or $action eq 2 or $action eq 8}
12 {include file="CRM/Member/Form/MembershipStatus.tpl"}
13 {else}
14 <div class="help">
15 <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/"}
16 <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}
17 </div>
18
19 {if $rows}
20 <div class="crm-content-block crm-block">
21 <div id="ltype">
22 <p></p>
23 <div id="membership_status_id">
24 {strip}
25 {* handle enable/disable actions*}
26 {include file="CRM/common/enableDisableApi.tpl"}
27 <table cellpadding="0" cellspacing="0" border="0" class="row-highlight">
28 <thead class="sticky">
29 <th>{ts}Status{/ts}</th>
30 <th>{ts}Start Event{/ts}</th>
31 <th>{ts}End Event{/ts}</th>
32 <th>{ts}Member{/ts}</th>
33 <th>{ts}Admin{/ts}</th>
34 <th>{ts}Order{/ts}</th>
35 <th>{ts}Reserved?{/ts}</th>
36 <th></th>
37 </thead>
38 {foreach from=$rows item=row}
39 <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">
40 <td class="crmf-label crm-editable" >{$row.label}</td>
41 <td class="crmf-start_event crm-editable" data-type="select" data-empty-option="{ts}- none -{/ts}">{$row.start_event}</td>
42 <td class="crmf-end_event crm-editable" data-type="select" data-empty-option="{ts}- none -{/ts}">{$row.end_event}</td>
43 <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>
44 <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>
45 <td class="nowrap crmf-weight">{$row.weight}</td>
46 <td class="crmf-is_reserved">{if $row.is_reserved eq 1} {ts}Yes{/ts} {else} {ts}No{/ts} {/if}</td>
47 <td>{$row.action|replace:'xx':$row.id}</td>
48 </tr>
49 {/foreach}
50 </table>
51 {/strip}
52
53 {if $action ne 1 and $action ne 2}
54 <div class="action-link">
55 {crmButton q="action=add&reset=1" id="newMembershipStatus" icon="plus-circle"}{ts}Add Membership Status{/ts}{/crmButton}
56 {crmButton p="civicrm/admin" q="reset=1" class="cancel" icon="times"}{ts}Done{/ts}{/crmButton}
57 </div>
58 {/if}
59 </div>
60 </div>
61 </div>
62 {else}
63 {if $action ne 1}
64 <div class="messages status no-popup">
65 <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}
66 </div>
67 {/if}
68 {/if}
69 {/if}