commiting uncommited changes on live site
[weblabels.fsf.org.git] / crm.fsf.org / 20131203 / files / sites / all / modules-old / civicrm / templates / CRM / Member / Form / MembershipView.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.6 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2015 |
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 <div class="crm-submit-buttons">
29 {* Check permissions and make sure this is not an inherited membership (edit and delete not allowed for inherited memberships) *}
30 {if ! $owner_contact_id AND call_user_func(array('CRM_Core_Permission','check'), 'edit memberships') }
31 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context"}
32 {if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey}
33 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context&key=$searchKey"}
34 {/if}
35 <a class="button" href="{crmURL p='civicrm/contact/view/membership' q=$urlParams}" accesskey="e" id="crm-membership-edit-button-top"><span><div class="icon ui-icon-pencil"></div> {ts}Edit{/ts}</span></a>
36 {/if}
37 {if ! $owner_contact_id AND call_user_func(array('CRM_Core_Permission','check'), 'delete in CiviMember')}
38 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context"}
39 {if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey}
40 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context&key=$searchKey"}
41 {/if}
42 <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>
43 {/if}
44 {include file="CRM/common/formButtons.tpl" location="bottom"}
45 </div>
46 <table class="crm-info-panel">
47 <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>
48 {if $owner_display_name}
49 <tr><td class="label">{ts}By Relationship{/ts}</td><td>{$relationship}&nbsp;&nbsp;<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>&nbsp;</td></tr>
50 {/if}
51 <tr><td class="label">{ts}Membership Type{/ts}</td><td>{$membership_type}</td></tr>
52 {if $has_related}
53 <tr><td class="label">{ts}Max related{/ts}</td><td>{$max_related}</td></tr>
54 {/if}
55 <tr><td class="label">{ts}Status{/ts}</td><td>{$status}</td></tr>
56 <tr><td class="label">{ts}Source{/ts}</td><td>{$source}</td></tr>
57 {if $campaign}<tr><td class="label">{ts}Campaign{/ts}</td><td>{$campaign}</td></tr>{/if}
58 <tr><td class="label">{ts}Member Since{/ts}</td><td>{$join_date|crmDate}</td></tr>
59 <tr><td class="label">{ts}Start date{/ts}</td><td>{$start_date|crmDate}</td></tr>
60 <tr><td class="label">{ts}End date{/ts}</td><td>{$end_date|crmDate}</td></tr>
61 <tr><td class="label">{ts}Auto-renew{/ts}</td><td>{$auto_renew}</td></tr>
62 </table>
63
64 {include file="CRM/Custom/Page/CustomDataView.tpl"}
65
66 {if $accessContribution and $rows.0.contribution_id}
67 <div class="crm-accordion-wrapper">
68 <div class="crm-accordion-header">{ts}Related Contributions{/ts}</div>
69 <div class="crm-accordion-body">{include file="CRM/Contribute/Form/Selector.tpl" context="Search"}</div>
70 </div>
71 {/if}
72
73 {if $softCredit}
74 <div class="crm-accordion-wrapper">
75 <div class="crm-accordion-header">{ts}Related Soft Contributions{/ts}</div>
76 <div class="crm-accordion-body">{include file="CRM/Contribute/Page/ContributionSoft.tpl" context="membership"}</div>
77 </div>
78 {/if}
79
80 {if $has_related}
81 {include file="CRM/Member/Form/MembershipRelated.tpl" context="Search"}
82 {/if}
83
84 <div class="crm-submit-buttons">
85 {* Check permissions and make sure this is not a related membership (edit and delete not allowed for related memberships) *}
86 {if ! $owner_contact_id AND call_user_func(array('CRM_Core_Permission','check'), 'edit memberships') }
87 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context"}
88 {if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey}
89 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=update&context=$context&key=$searchKey"}
90 {/if}
91 <a class="button" href="{crmURL p='civicrm/contact/view/membership' q=$urlParams}" accesskey="e" id="crm-membership-edit-button-bottom"><span><div class="icon ui-icon-pencil"></div> {ts}Edit{/ts}</span></a>
92 {/if}
93 {if ! $owner_contact_id AND call_user_func(array('CRM_Core_Permission','check'), 'delete in CiviMember')}
94 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context"}
95 {if ( $context eq 'fulltext' || $context eq 'search' ) && $searchKey}
96 {assign var='urlParams' value="reset=1&id=$id&cid=$contact_id&action=delete&context=$context&key=$searchKey"}
97 {/if}
98 <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>
99 {/if}
100 {include file="CRM/common/formButtons.tpl" location="bottom"}
101 </div>
102 </div>
103