2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.4 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2013 |
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 {include file="CRM/common/wysiwyg.tpl" includeWysiwygEditor=true}
33 <div class="crm-summary-contactname-block crm-inline-edit-container">
34 <div class="crm-summary-block" id="contactname-block">
35 {include file="CRM/Contact/Page/Inline/ContactName.tpl"}
40 <div class="crm-actions-ribbon">
42 {assign var='urlParams' value="reset=1"}
44 {assign var='urlParams' value=$urlParams|cat:"&key=$searchKey"}
47 {assign var='urlParams' value=$urlParams|cat:"&context=$context"}
50 {* CRM-12735 - Conditionally include the Actions and Edit buttons if contact is NOT in trash.*}
52 {if call_user_func(array('CRM_Core_Permission','check'), 'access CiviCRM')}
53 <li class="crm-contact-activity crm-summary-block">
54 {include file="CRM/Contact/Page/Inline/Actions.tpl"}
57 {* Include Edit button if contact has 'edit contacts' permission OR user is viewing their own contact AND has 'edit my contact' permission. *}
58 {if $permission EQ 'edit' || call_user_func(array('CRM_Core_Permission','check'), 'edit my contact')}
60 {assign var='editParams' value=$urlParams|cat:"&action=update&cid=$contactId"}
61 <a href="{crmURL p='civicrm/contact/add' q=$editParams}" class="edit button" title="{ts}Edit{/ts}">
62 <span><div class="icon edit-icon"></div>{ts}Edit{/ts}</span>
68 {* Check for permissions to provide Restore and Delete Permanently buttons for contacts that are in the trash. *}
69 {if (call_user_func(array('CRM_Core_Permission','check'), 'access deleted contacts') and
71 <li class="crm-contact-restore">
72 <a href="{crmURL p='civicrm/contact/view/delete' q="reset=1&cid=$contactId&restore=1"}" class="delete button" title="{ts}Restore{/ts}">
73 <span><div class="icon restore-icon"></div>{ts}Restore from Trash{/ts}</span>
77 {if call_user_func(array('CRM_Core_Permission','check'), 'delete contacts')}
78 <li class="crm-contact-permanently-delete">
79 <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}">
80 <span><div class="icon delete-icon"></div>{ts}Delete Permanently{/ts}</span>
85 {elseif call_user_func(array('CRM_Core_Permission','check'), 'delete contacts')}
86 {assign var='deleteParams' value="&reset=1&delete=1&cid=$contactId"}
87 <li class="crm-delete-action crm-contact-delete">
88 <a href="{crmURL p='civicrm/contact/view/delete' q=$deleteParams}" class="delete button" title="{ts}Delete{/ts}">
89 <span><div class="icon delete-icon"></div>{ts}Delete Contact{/ts}</span>
94 {* Previous and Next contact navigation when accessing contact summary from search results. *}
96 <li class="crm-next-action">
97 {help id="id-next-prev-buttons"}
101 {assign var='viewParams' value=$urlParams|cat:"&cid=$nextContactID"}
102 <li class="crm-next-action">
103 <a href="{crmURL p='civicrm/contact/view' q=$viewParams}" class="view button" title="{$nextContactName}">
104 <span title="{$nextContactName}"><div class="icon next-icon"></div>{ts}Next{/ts}</span>
109 {assign var='viewParams' value=$urlParams|cat:"&cid=$prevContactID"}
110 <li class="crm-previous-action">
111 <a href="{crmURL p='civicrm/contact/view' q=$viewParams}" class="view button" title="{$prevContactName}">
112 <span title="{$prevContactName}"><div class="icon previous-icon"></div>{ts}Previous{/ts}</span>
118 {if !empty($groupOrganizationUrl)}
119 <li class="crm-contact-associated-groups">
120 <a href="{$groupOrganizationUrl}" class="associated-groups button" title="{ts}Associated Multi-Org Group{/ts}">
121 <span><div class="icon associated-groups-icon"></div>{ts}Associated Multi-Org Group{/ts}</span>
126 <div class="clear"></div>
127 </div><!-- .crm-actions-ribbon -->
130 <div class="crm-block crm-content-block crm-contact-page crm-inline-edit-container">
131 <div id="mainTabContainer">
132 <ul class="crm-contact-tabs-list">
133 <li id="tab_summary" class="crm-tab-button ui-corner-all">
134 <a href="#contact-summary" title="{ts}Summary{/ts}">
135 <span> </span> {ts}Summary{/ts}
139 {foreach from=$allTabs key=tabName item=tabValue}
140 <li id="tab_{$tabValue.id}" class="crm-tab-button ui-corner-all crm-count-{$tabValue.count}{if isset($tabValue.class)} {$tabValue.class}{/if}">
141 <a href="{$tabValue.url}" title="{$tabValue.title}">
142 <span> </span> {$tabValue.title}
143 <em>{$tabValue.count}</em>
149 <div id="contact-summary" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
150 {if (isset($hookContentPlacement) and ($hookContentPlacement neq 3)) or empty($hookContentPlacement)}
152 {if !empty($hookContent) and isset($hookContentPlacement) and $hookContentPlacement eq 2}
153 {include file="CRM/Contact/Page/View/SummaryHook.tpl"}
156 <div class="contactTopBar contact_panel">
157 <div class="contactCardLeft">
158 {crmRegion name="contact-basic-info-left"}
159 <div class="crm-summary-contactinfo-block">
160 <div class="crm-summary-block" id="contactinfo-block">
161 {include file="CRM/Contact/Page/Inline/ContactInfo.tpl"}
165 </div> <!-- end of left side -->
166 <div class="contactCardRight">
167 {crmRegion name="contact-basic-info-right"}
168 {if !empty($imageURL)}
169 <div id="crm-contact-thumbnail">
170 {include file="CRM/Contact/Page/ContactImage.tpl"}
173 <div class="{if !empty($imageURL)} float-left{/if}">
174 <div class="crm-clear crm-summary-block">
175 <div class="crm-summary-row">
176 <div class="crm-label" id="tagLink">
177 <a href="{crmURL p='civicrm/contact/view' q="reset=1&cid=$contactId&selectedChild=tag"}"
178 title="{ts}Edit Tags{/ts}">{ts}Tags{/ts}</a>
180 <div class="crm-content" id="tags">{$contactTag}</div>
182 <div class="crm-summary-row">
183 <div class="crm-label">{ts}Contact Type{/ts}</div>
184 <div class="crm-content crm-contact_type_label">
185 {if isset($contact_type_label)}{$contact_type_label}{/if}
188 <div class="crm-summary-row">
189 <div class="crm-label">
190 {ts}CiviCRM ID{/ts}{if !empty($userRecordUrl)} / {ts}User ID{/ts}{/if}
192 <div class="crm-content">
193 <span class="crm-contact-contact_id">{$contactId}</span>
194 {if !empty($userRecordUrl)}
195 <span class="crm-contact-user_record_id">
196 / <a title="View user record" class="user-record-link"
197 href="{$userRecordUrl}">{$userRecordId}</a>
202 <div class="crm-summary-row">
203 <div class="crm-label">{ts}External ID{/ts}</div>
204 <div class="crm-content crm-contact_external_identifier_label">
205 {if isset($external_identifier)}{$external_identifier}{/if}
212 <!-- end of right side -->
214 <div class="contact_details">
215 <div class="contact_panel">
216 <div class="contactCardLeft">
217 {crmRegion name="contact-details-left"}
220 <div class="crm-summary-email-block crm-summary-block" id="email-block">
221 {include file="CRM/Contact/Page/Inline/Email.tpl"}
225 <div class="crm-summary-website-block crm-summary-block" id="website-block">
226 {include file="CRM/Contact/Page/Inline/Website.tpl"}
231 </div><!-- #contactCardLeft -->
233 <div class="contactCardRight">
234 {crmRegion name="contact-details-right"}
237 <div class="crm-summary-phone-block crm-summary-block" id="phone-block">
238 {include file="CRM/Contact/Page/Inline/Phone.tpl"}
242 <div class="crm-summary-im-block crm-summary-block" id="im-block">
243 {include file="CRM/Contact/Page/Inline/IM.tpl"}
247 <div class="crm-summary-openid-block crm-summary-block" id="openid-block">
248 {include file="CRM/Contact/Page/Inline/OpenID.tpl"}
253 </div><!-- #contactCardRight -->
255 <div class="clear"></div>
256 </div><!-- #contact_panel -->
258 <div class="contact_panel">
259 {assign var='locationIndex' value=1}
261 {foreach from=$address item=add key=locationIndex}
262 <div class="{if $locationIndex is odd}contactCardLeft{else}contactCardRight{/if} crm-address_{$locationIndex} crm-address-block crm-summary-block">
263 {include file="CRM/Contact/Page/Inline/Address.tpl"}
266 {assign var='locationIndex' value=$locationIndex+1}
269 {if $permission EQ 'edit'}
270 {assign var='add' value=0}
271 <div class="{if $locationIndex is odd}contactCardLeft{else}contactCardRight{/if} crm-address-block crm-summary-block">
272 {include file="CRM/Contact/Page/Inline/Address.tpl"}
276 </div> <!-- end of contact panel -->
278 <div class="contact_panel">
279 {if $showCommunicationPreferences}
280 <div class="contactCardLeft">
281 <div class="crm-summary-comm-pref-block">
282 <div class="crm-summary-block" id="communication-pref-block" >
283 {include file="CRM/Contact/Page/Inline/CommunicationPreferences.tpl"}
286 </div> <!-- contactCardLeft -->
288 {if $contact_type eq 'Individual' AND $showDemographics}
289 <div class="contactCardRight">
290 <div class="crm-summary-demographic-block">
291 <div class="crm-summary-block" id="demographic-block">
292 {include file="CRM/Contact/Page/Inline/Demographics.tpl"}
295 </div> <!-- contactCardRight -->
297 <div class="clear"></div>
298 <div class="separator"></div>
299 </div> <!-- contact panel -->
300 </div><!--contact_details-->
303 <div id="customFields">
304 <div class="contact_panel">
305 <div class="contactCardLeft">
306 {include file="CRM/Contact/Page/View/CustomDataView.tpl" side='1'}
307 </div><!--contactCardLeft-->
308 <div class="contactCardRight">
309 {include file="CRM/Contact/Page/View/CustomDataView.tpl" side='0'}
312 <div class="clear"></div>
317 {if !empty($hookContent) and isset($hookContentPlacement) and $hookContentPlacement eq 1}
318 {include file="CRM/Contact/Page/View/SummaryHook.tpl"}
321 {include file="CRM/Contact/Page/View/SummaryHook.tpl"}
324 <div class="clear"></div>
326 <div class="clear"></div>
327 </div><!-- /.crm-content-block -->
332 <script type="text/javascript">
334 $('.crm-inline-edit-container').crmFormContactLock({
335 ignoreLabel: "{/literal}{ts escape='js'}Ignore{/ts}{literal}",
336 saveAnywayLabel: "{/literal}{ts escape='js'}Save Anyway{/ts}{literal}",
337 reloadLabel: "{/literal}{ts escape='js'}Reload Page{/ts}{literal}"
343 {* jQuery validate *}
344 {include file="CRM/Form/validate.tpl" form=0}