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 | {* View existing membership record. *} | |
27 | <div class="crm-block crm-content-block crm-membership-view-form-block"> | |
28 | <h3>{ts}View Membership{/ts}</h3> | |
29 | <div class="crm-submit-buttons"> | |
30 | {* Check permissions and make sure this is not an inherited membership (edit and delete not allowed for inherited memberships) *} | |
31 | {if ! $owner_contact_id AND call_user_func(array('CRM_Core_Permission','check'), 'edit memberships') } | |
32 | {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context"} | |
33 | {if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey} | |
34 | {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context&key=$searchKey"} | |
35 | {/if} | |
36 | <a class="button" href="{crmURL p='civicrm/contact/view/membership' q=$urlParams}" accesskey="e" id="crm-membership-edit-button-top"><span><div class="icon edit-icon"></div> {ts}Edit{/ts}</span></a> | |
37 | {/if} | |
38 | {if ! $owner_contact_id AND call_user_func(array('CRM_Core_Permission','check'), 'delete in CiviMember')} | |
39 | {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context"} | |
40 | {if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey} | |
41 | {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context&key=$searchKey"} | |
42 | {/if} | |
43 | <a class="button" href="{crmURL p='civicrm/contact/view/membership' q=$urlParams}" id="crm-membership-delete-button-top"><span><div class="icon delete-icon"></div>{ts}Delete{/ts}</span></a> | |
44 | {/if} | |
45 | {include file="CRM/common/formButtons.tpl" location="bottom"} | |
46 | </div> | |
47 | <table class="crm-info-panel"> | |
48 | <tr><td class="label">{ts}Member{/ts}</td><td class="bold"><a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=$contact_id&context=$context"}" title="{ts}View contact summary{/ts}">{$displayName}</td></tr> | |
49 | {if $owner_display_name} | |
50 | <tr><td class="label">{ts}By Relationship{/ts}</td><td>{$relationship} <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=$owner_contact_id&context=$context"}" title="{ts}View primary member contact summary{/ts}">{$owner_display_name}</a> </td></tr> | |
51 | {/if} | |
52 | <tr><td class="label">{ts}Membership Type{/ts}</td><td>{$membership_type}</td></tr> | |
53 | {if $has_related} | |
54 | <tr><td class="label">{ts}Max related{/ts}</td><td>{$max_related}</td></tr> | |
55 | {/if} | |
56 | <tr><td class="label">{ts}Status{/ts}</td><td>{$status}</td></tr> | |
57 | <tr><td class="label">{ts}Source{/ts}</td><td>{$source}</td></tr> | |
58 | {if $campaign}<tr><td class="label">{ts}Campaign{/ts}</td><td>{$campaign}</td></tr>{/if} | |
59 | <tr><td class="label">{ts}Member Since{/ts}</td><td>{$join_date|crmDate}</td></tr> | |
60 | <tr><td class="label">{ts}Start date{/ts}</td><td>{$start_date|crmDate}</td></tr> | |
61 | <tr><td class="label">{ts}End date{/ts}</td><td>{$end_date|crmDate}</td></tr> | |
62 | <tr><td class="label">{ts}Auto-renew{/ts}</td><td>{$auto_renew}</td></tr> | |
63 | </table> | |
64 | ||
65 | {include file="CRM/Custom/Page/CustomDataView.tpl"} | |
66 | ||
67 | {if $accessContribution and $rows.0.contribution_id} | |
eb3cfcd6 | 68 | <div class="crm-accordion-wrapper"> |
64c1e6ea | 69 | <div class="crm-accordion-header">{ts}Related Contributions{/ts}</div> |
eb3cfcd6 | 70 | <div class="crm-accordion-body">{include file="CRM/Contribute/Form/Selector.tpl" context="Search"}</div> |
71 | </div> | |
6a488035 TO |
72 | {/if} |
73 | ||
91ef9be0 | 74 | {if $softCredit} |
eb3cfcd6 | 75 | <div class="crm-accordion-wrapper"> |
64c1e6ea | 76 | <div class="crm-accordion-header">{ts}Related Soft Contributions{/ts}</div> |
eb3cfcd6 | 77 | <div class="crm-accordion-body">{include file="CRM/Contribute/Page/ContributionSoft.tpl" context="membership"}</div> |
78 | </div> | |
91ef9be0 | 79 | {/if} |
80 | ||
6a488035 TO |
81 | {if $has_related} |
82 | {include file="CRM/Member/Form/MembershipRelated.tpl" context="Search"} | |
83 | {/if} | |
84 | ||
85 | <div class="crm-submit-buttons"> | |
86 | {* Check permissions and make sure this is not a related membership (edit and delete not allowed for related memberships) *} | |
87 | {if ! $owner_contact_id AND call_user_func(array('CRM_Core_Permission','check'), 'edit memberships') } | |
88 | {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context"} | |
89 | {if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey} | |
90 | {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context&key=$searchKey"} | |
91 | {/if} | |
92 | <a class="button" href="{crmURL p='civicrm/contact/view/membership' q=$urlParams}" accesskey="e" id="crm-membership-edit-button-bottom"><span><div class="icon edit-icon"></div> {ts}Edit{/ts}</span></a> | |
93 | {/if} | |
94 | {if ! $owner_contact_id AND call_user_func(array('CRM_Core_Permission','check'), 'delete in CiviMember')} | |
95 | {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context"} | |
96 | {if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey} | |
97 | {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context&key=$searchKey"} | |
98 | {/if} | |
99 | <a class="button" href="{crmURL p='civicrm/contact/view/membership' q=$urlParams}" id="crm-membership-delete-button-bottom"><span><div class="icon delete-icon"></div>{ts}Delete{/ts}</span></a> | |
100 | {/if} | |
101 | {include file="CRM/common/formButtons.tpl" location="bottom"} | |
102 | </div> | |
103 | </div> | |
104 |