| 1 | {* |
| 2 | +--------------------------------------------------------------------+ |
| 3 | | CiviCRM version 4.4 | |
| 4 | +--------------------------------------------------------------------+ |
| 5 | | Copyright CiviCRM LLC (c) 2004-2013 | |
| 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 | {if $context EQ 'Search'} |
| 27 | {include file="CRM/common/pager.tpl" location="top"} |
| 28 | {/if} |
| 29 | |
| 30 | {strip} |
| 31 | <table class="selector"> |
| 32 | <thead class="sticky"> |
| 33 | {if ! $single and $context eq 'Search' } |
| 34 | <th scope="col" title="Select Rows">{$form.toggleSelect.html}</th> |
| 35 | {/if} |
| 36 | {foreach from=$columnHeaders item=header} |
| 37 | <th scope="col"> |
| 38 | {if $header.sort} |
| 39 | {assign var='key' value=$header.sort} |
| 40 | {$sort->_response.$key.link} |
| 41 | {else} |
| 42 | {$header.name} |
| 43 | {/if} |
| 44 | </th> |
| 45 | {/foreach} |
| 46 | </thead> |
| 47 | |
| 48 | {counter start=0 skip=1 print=false} |
| 49 | {foreach from=$rows item=row} |
| 50 | <tr id='rowid{$row.membership_id}' class="{cycle values="odd-row,even-row"} {*if $row.cancel_date} disabled{/if*} crm-membership_{$row.membership_id}"> |
| 51 | {if ! $single } |
| 52 | {if $context eq 'Search' } |
| 53 | {assign var=cbName value=$row.checkbox} |
| 54 | <td>{$form.$cbName.html}</td> |
| 55 | {/if} |
| 56 | <td>{$row.contact_type}</td> |
| 57 | <td> |
| 58 | <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=`$row.contact_id`"}" title="{ts}View contact record{/ts}">{$row.sort_name}</a> |
| 59 | </td> |
| 60 | {/if} |
| 61 | <td class="crm-membership-type crm-membership-type_{$row.membership_type}"> |
| 62 | {$row.membership_type} |
| 63 | {if $row.owner_membership_id}<br />({ts}by relationship{/ts}){/if} |
| 64 | </td> |
| 65 | <td class="crm-membership-join_date">{$row.join_date|truncate:10:''|crmDate}</td> |
| 66 | <td class="crm-membership-start_date">{$row.membership_start_date|truncate:10:''|crmDate}</td> |
| 67 | <td class="crm-membership-end_date">{$row.membership_end_date|truncate:10:''|crmDate}</td> |
| 68 | <td class="crm-membership-source">{$row.membership_source}</td> |
| 69 | <td class="crm-membership-status crm-membership-status_{$row.membership_status}">{$row.membership_status}</td> |
| 70 | <td class="crm-membership-auto_renew">{if $row.auto_renew}<img src="{$config->resourceBase}i/check.gif" alt="{ts}Auto-renew{/ts}" /> {/if}</td> |
| 71 | <td> |
| 72 | {$row.action|replace:'xx':$row.membership_id} |
| 73 | {if $row.owner_membership_id} |
| 74 | <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> |
| 75 | {/if} |
| 76 | </td> |
| 77 | </tr> |
| 78 | {/foreach} |
| 79 | {* Link to "View all memberships" for Contact Summary selector display *} |
| 80 | {if ($context EQ 'membership') AND $pager->_totalItems GT $limit} |
| 81 | <tr class="even-row"> |
| 82 | <td colspan="7"><a href="{crmURL p='civicrm/contact/view' q="reset=1&force=1&selectedChild=member&cid=$contactId"}">» {ts}View all memberships for this contact{/ts}...</a></td></tr> |
| 83 | </tr> |
| 84 | {/if} |
| 85 | {if ($context EQ 'dashboard') AND $pager->_totalItems GT $limit} |
| 86 | <tr class="even-row"> |
| 87 | <td colspan="9"><a href="{crmURL p='civicrm/member/search' q='reset=1'}">» {ts}Find more members{/ts}...</a></td></tr> |
| 88 | </tr> |
| 89 | {/if} |
| 90 | </table> |
| 91 | {/strip} |
| 92 | |
| 93 | |
| 94 | |
| 95 | {if $context EQ 'Search'} |
| 96 | {include file="CRM/common/pager.tpl" location="bottom"} |
| 97 | {/if} |