Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
1188c7a8 | 3 | | Copyright CiviCRM LLC. All rights reserved. | |
6a488035 | 4 | | | |
1188c7a8 TO |
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 | | |
6a488035 TO |
8 | +--------------------------------------------------------------------+ |
9 | *} | |
10 | {if $context EQ 'Search'} | |
11 | {include file="CRM/common/pager.tpl" location="top"} | |
12 | {/if} | |
13 | ||
14 | {strip} | |
16850d34 | 15 | <table class="selector row-highlight"> |
6a488035 TO |
16 | <thead class="sticky"> |
17 | {if ! $single and $context eq 'Search' } | |
18 | <th scope="col" title="Select Rows">{$form.toggleSelect.html}</th> | |
19 | {/if} | |
20 | {foreach from=$columnHeaders item=header} | |
21 | <th scope="col"> | |
22 | {if $header.sort} | |
23 | {assign var='key' value=$header.sort} | |
24 | {$sort->_response.$key.link} | |
25 | {else} | |
26 | {$header.name} | |
27 | {/if} | |
28 | </th> | |
29 | {/foreach} | |
30 | </thead> | |
31 | ||
32 | {counter start=0 skip=1 print=false} | |
33 | {foreach from=$rows item=row} | |
34 | <tr id='rowid{$row.membership_id}' class="{cycle values="odd-row,even-row"} {*if $row.cancel_date} disabled{/if*} crm-membership_{$row.membership_id}"> | |
35 | {if ! $single } | |
36 | {if $context eq 'Search' } | |
37 | {assign var=cbName value=$row.checkbox} | |
38 | <td>{$form.$cbName.html}</td> | |
39 | {/if} | |
40 | <td>{$row.contact_type}</td> | |
41 | <td> | |
42 | <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`"}" title="{ts}View contact record{/ts}">{$row.sort_name}</a> | |
43 | </td> | |
44 | {/if} | |
45 | <td class="crm-membership-type crm-membership-type_{$row.membership_type}"> | |
abe11616 | 46 | {$row.membership_type}{if $row.is_test} ({ts}test{/ts}){/if} |
6a488035 TO |
47 | {if $row.owner_membership_id}<br />({ts}by relationship{/ts}){/if} |
48 | </td> | |
5f97e97f | 49 | <td class="crm-membership-join_date">{$row.membership_join_date|truncate:10:''|crmDate}</td> |
6a488035 TO |
50 | <td class="crm-membership-start_date">{$row.membership_start_date|truncate:10:''|crmDate}</td> |
51 | <td class="crm-membership-end_date">{$row.membership_end_date|truncate:10:''|crmDate}</td> | |
52 | <td class="crm-membership-source">{$row.membership_source}</td> | |
53 | <td class="crm-membership-status crm-membership-status_{$row.membership_status}">{$row.membership_status}</td> | |
6bb529e7 MW |
54 | <td class="crm-membership-auto_renew"> |
55 | {if $row.auto_renew eq 1} | |
30773a77 | 56 | <i class="crm-i fa-check" aria-hidden="true" title="{ts}Auto-renew active{/ts}"></i> |
6bb529e7 | 57 | {elseif $row.auto_renew eq 2} |
30773a77 | 58 | <i class="crm-i fa-ban" aria-hidden="true" title="{ts}Auto-renew error{/ts}"></i> |
6bb529e7 MW |
59 | {/if} |
60 | </td> | |
6a488035 TO |
61 | <td> |
62 | {$row.action|replace:'xx':$row.membership_id} | |
63 | {if $row.owner_membership_id} | |
64 | <a href="{crmURL p='civicrm/membership/view' q="reset=1&id=`$row.owner_membership_id`&action=view&context=search"}" title="{ts}View Primary member record{/ts}" class="action-item">{ts}View Primary{/ts}</a> | |
65 | {/if} | |
66 | </td> | |
67 | </tr> | |
68 | {/foreach} | |
69 | {* Link to "View all memberships" for Contact Summary selector display *} | |
70 | {if ($context EQ 'membership') AND $pager->_totalItems GT $limit} | |
71 | <tr class="even-row"> | |
13a3d214 | 72 | <td colspan="7"><a href="{crmURL p='civicrm/contact/view' q="reset=1&force=1&selectedChild=member&cid=$contactId"}"><i class="crm-i fa-chevron-right" aria-hidden="true"></i> {ts}View all memberships for this contact{/ts}...</a></td></tr> |
6a488035 TO |
73 | </tr> |
74 | {/if} | |
75 | {if ($context EQ 'dashboard') AND $pager->_totalItems GT $limit} | |
76 | <tr class="even-row"> | |
13a3d214 | 77 | <td colspan="10"><a href="{crmURL p='civicrm/member/search' q='reset=1'}"><i class="crm-i fa-chevron-right" aria-hidden="true"></i> {ts}Find more members{/ts}...</a></td></tr> |
6a488035 TO |
78 | </tr> |
79 | {/if} | |
80 | </table> | |
81 | {/strip} | |
82 | ||
d664f648 | 83 | |
6a488035 TO |
84 | |
85 | {if $context EQ 'Search'} | |
86 | {include file="CRM/common/pager.tpl" location="bottom"} | |
87 | {/if} |