2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.7 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2015 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
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. |
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. |
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 +--------------------------------------------------------------------+
26 {* Contact Summary template for new tabbed interface. Replaces Basic.tpl *}
28 {include file="CRM/Contact/Form/Contact.tpl"}
31 <div class="crm-summary-contactname-block crm-inline-edit-container">
32 <div class="crm-summary-block" id="contactname-block">
33 {include file="CRM/Contact/Page/Inline/ContactName.tpl"}
38 <div class="crm-actions-ribbon">
40 {assign var='urlParams' value="reset=1"}
42 {assign var='urlParams' value=$urlParams|cat:"&key=$searchKey"}
45 {assign var='urlParams' value=$urlParams|cat:"&context=$context"}
48 {* CRM-12735 - Conditionally include the Actions and Edit buttons if contact is NOT in trash.*}
50 {if call_user_func(array('CRM_Core_Permission','check'), 'access CiviCRM')}
51 <li class="crm-contact-activity crm-summary-block">
52 {include file="CRM/Contact/Page/Inline/Actions.tpl"}
55 {* Include Edit button if contact has 'edit contacts' permission OR user is viewing their own contact AND has 'edit my contact' permission. CRM_Contact_Page_View::checkUserPermission handles this and assigns $permission true as needed. *}
56 {if $permission EQ 'edit'}
58 {assign var='editParams' value=$urlParams|cat:"&action=update&cid=$contactId"}
59 <a href="{crmURL p='civicrm/contact/add' q=$editParams}" class="edit button" title="{ts}Edit{/ts}">
60 <span><div class="icon ui-icon-pencil"></div>{ts}Edit{/ts}</span>
66 {* Check for permissions to provide Restore and Delete Permanently buttons for contacts that are in the trash. *}
67 {if (call_user_func(array('CRM_Core_Permission','check'), 'access deleted contacts') and
69 <li class="crm-contact-restore">
70 <a href="{crmURL p='civicrm/contact/view/delete' q="reset=1&cid=$contactId&restore=1"}" class="delete button" title="{ts}Restore{/ts}">
71 <span><div class="icon restore-icon"></div>{ts}Restore from Trash{/ts}</span>
75 {if call_user_func(array('CRM_Core_Permission','check'), 'delete contacts')}
76 <li class="crm-contact-permanently-delete">
77 <a href="{crmURL p='civicrm/contact/view/delete' q="reset=1&delete=1&cid=$contactId&skip_undelete=1"}" class="delete button" title="{ts}Delete Permanently{/ts}">
78 <span><div class="icon delete-icon"></div>{ts}Delete Permanently{/ts}</span>
83 {elseif call_user_func(array('CRM_Core_Permission','check'), 'delete contacts')}
84 {assign var='deleteParams' value="&reset=1&delete=1&cid=$contactId"}
85 <li class="crm-delete-action crm-contact-delete">
86 <a href="{crmURL p='civicrm/contact/view/delete' q=$deleteParams}" class="delete button" title="{ts}Delete{/ts}">
87 <span><div class="icon delete-icon"></div>{ts}Delete Contact{/ts}</span>
92 {* Previous and Next contact navigation when accessing contact summary from search results. *}
94 <li class="crm-next-action">
95 {help id="id-next-prev-buttons"}
99 {assign var='viewParams' value=$urlParams|cat:"&cid=$nextContactID"}
100 <li class="crm-next-action">
101 <a href="{crmURL p='civicrm/contact/view' q=$viewParams}" class="view button" title="{$nextContactName}">
102 <span title="{$nextContactName}"><div class="icon ui-icon-carat-1-e"></div>{ts}Next{/ts}</span>
107 {assign var='viewParams' value=$urlParams|cat:"&cid=$prevContactID"}
108 <li class="crm-previous-action">
109 <a href="{crmURL p='civicrm/contact/view' q=$viewParams}" class="view button" title="{$prevContactName}">
110 <span title="{$prevContactName}"><div class="icon ui-icon-carat-1-w"></div>{ts}Previous{/ts}</span>
116 {if !empty($groupOrganizationUrl)}
117 <li class="crm-contact-associated-groups">
118 <a href="{$groupOrganizationUrl}" class="associated-groups button" title="{ts}Associated Multi-Org Group{/ts}">
119 <span><div class="icon associated-groups-icon"></div>{ts}Associated Multi-Org Group{/ts}</span>
124 <div class="clear"></div>
125 </div><!-- .crm-actions-ribbon -->
128 <div class="crm-block crm-content-block crm-contact-page crm-inline-edit-container">
129 <div id="mainTabContainer">
130 <ul class="crm-contact-tabs-list">
131 <li id="tab_summary" class="crm-tab-button ui-corner-all">
132 <a href="#contact-summary" title="{ts}Summary{/ts}">
133 <span> </span> {ts}Summary{/ts}
137 {foreach from=$allTabs key=tabName item=tabValue}
138 <li id="tab_{$tabValue.id}" class="crm-tab-button ui-corner-all crm-count-{$tabValue.count}{if isset($tabValue.class)} {$tabValue.class}{/if}">
139 <a href="{$tabValue.url}" title="{$tabValue.title}">
141 {if empty($tabValue.hideCount)}<em>{$tabValue.count}</em>{/if}
147 <div id="contact-summary" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
148 {if (isset($hookContentPlacement) and ($hookContentPlacement neq 3)) or empty($hookContentPlacement)}
150 {if !empty($hookContent) and isset($hookContentPlacement) and $hookContentPlacement eq 2}
151 {include file="CRM/Contact/Page/View/SummaryHook.tpl"}
154 <div class="contactTopBar contact_panel">
155 <div class="contactCardLeft">
156 {crmRegion name="contact-basic-info-left"}
157 <div class="crm-summary-contactinfo-block">
158 <div class="crm-summary-block" id="contactinfo-block">
159 {include file="CRM/Contact/Page/Inline/ContactInfo.tpl"}
163 </div> <!-- end of left side -->
164 <div class="contactCardRight">
165 {crmRegion name="contact-basic-info-right"}
166 {if !empty($imageURL)}
167 <div id="crm-contact-thumbnail">
168 {include file="CRM/Contact/Page/ContactImage.tpl"}
171 <div class="{if !empty($imageURL)} float-left{/if}">
172 <div class="crm-clear crm-summary-block">
173 <div class="crm-summary-row">
174 <div class="crm-label" id="tagLink">
175 <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=$contactId&selectedChild=tag"}"
176 title="{ts}Edit Tags{/ts}">{ts}Tags{/ts}</a>
178 <div class="crm-content" id="tags">{$contactTag}</div>
180 <div class="crm-summary-row">
181 <div class="crm-label">{ts}Contact Type{/ts}</div>
182 <div class="crm-content crm-contact_type_label">
183 {if isset($contact_type_label)}{$contact_type_label}{/if}
186 <div class="crm-summary-row">
187 <div class="crm-label">
188 {ts}Contact ID{/ts}{if !empty($userRecordUrl)} / {ts}User ID{/ts}{/if}
190 <div class="crm-content">
191 <span class="crm-contact-contact_id">{$contactId}</span>
192 {if !empty($userRecordUrl)}
193 <span class="crm-contact-user_record_id">
194 / <a title="View user record" class="user-record-link"
195 href="{$userRecordUrl}">{$userRecordId}</a>
200 <div class="crm-summary-row">
201 <div class="crm-label">{ts}External ID{/ts}</div>
202 <div class="crm-content crm-contact_external_identifier_label">
203 {if isset($external_identifier)}{$external_identifier}{/if}
210 <!-- end of right side -->
212 <div class="contact_details">
213 <div class="contact_panel">
214 <div class="contactCardLeft">
215 {crmRegion name="contact-details-left"}
218 <div class="crm-summary-email-block crm-summary-block" id="email-block">
219 {include file="CRM/Contact/Page/Inline/Email.tpl"}
223 <div class="crm-summary-website-block crm-summary-block" id="website-block">
224 {include file="CRM/Contact/Page/Inline/Website.tpl"}
229 </div><!-- #contactCardLeft -->
231 <div class="contactCardRight">
232 {crmRegion name="contact-details-right"}
235 <div class="crm-summary-phone-block crm-summary-block" id="phone-block">
236 {include file="CRM/Contact/Page/Inline/Phone.tpl"}
240 <div class="crm-summary-im-block crm-summary-block" id="im-block">
241 {include file="CRM/Contact/Page/Inline/IM.tpl"}
245 <div class="crm-summary-openid-block crm-summary-block" id="openid-block">
246 {include file="CRM/Contact/Page/Inline/OpenID.tpl"}
251 </div><!-- #contactCardRight -->
253 <div class="clear"></div>
254 </div><!-- #contact_panel -->
256 <div class="contact_panel">
257 {assign var='locationIndex' value=1}
259 {foreach from=$address item=add key=locationIndex}
260 <div class="{if $locationIndex is odd}contactCardLeft{else}contactCardRight{/if} crm-address_{$locationIndex} crm-address-block crm-summary-block">
261 {include file="CRM/Contact/Page/Inline/Address.tpl"}
264 {assign var='locationIndex' value=$locationIndex+1}
267 {if $permission EQ 'edit'}
268 {assign var='add' value=0}
269 <div class="{if $locationIndex is odd}contactCardLeft{else}contactCardRight{/if} crm-address-block crm-summary-block">
270 {include file="CRM/Contact/Page/Inline/Address.tpl"}
274 </div> <!-- end of contact panel -->
276 <div class="contact_panel">
277 {if $showCommunicationPreferences}
278 <div class="contactCardLeft">
279 <div class="crm-summary-comm-pref-block">
280 <div class="crm-summary-block" id="communication-pref-block" >
281 {include file="CRM/Contact/Page/Inline/CommunicationPreferences.tpl"}
284 </div> <!-- contactCardLeft -->
286 {if $contact_type eq 'Individual' AND $showDemographics}
287 <div class="contactCardRight">
288 <div class="crm-summary-demographic-block">
289 <div class="crm-summary-block" id="demographic-block">
290 {include file="CRM/Contact/Page/Inline/Demographics.tpl"}
293 </div> <!-- contactCardRight -->
295 <div class="clear"></div>
296 <div class="separator"></div>
297 </div> <!-- contact panel -->
298 </div><!--contact_details-->
301 <div id="customFields">
302 <div class="contact_panel">
303 <div class="contactCardLeft">
304 {include file="CRM/Contact/Page/View/CustomDataView.tpl" side='1'}
305 </div><!--contactCardLeft-->
306 <div class="contactCardRight">
307 {include file="CRM/Contact/Page/View/CustomDataView.tpl" side='0'}
310 <div class="clear"></div>
315 {if !empty($hookContent) and isset($hookContentPlacement) and $hookContentPlacement eq 1}
316 {include file="CRM/Contact/Page/View/SummaryHook.tpl"}
319 {include file="CRM/Contact/Page/View/SummaryHook.tpl"}
322 <div class="clear"></div>
324 <div class="clear"></div>
325 </div><!-- /.crm-content-block -->
330 <script type="text/javascript">
332 $('.crm-inline-edit-container').crmFormContactLock({
333 ignoreLabel: "{/literal}{ts escape='js'}Ignore{/ts}{literal}",
334 saveAnywayLabel: "{/literal}{ts escape='js'}Save Anyway{/ts}{literal}",
335 reloadLabel: "{/literal}{ts escape='js'}Reload Page{/ts}{literal}"