2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.3 |
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 {* include overlay js *}
34 {include file="CRM/common/overlay.tpl"}
36 <div class="crm-summary-contactname-block crm-inline-edit-container">
37 <div class="crm-summary-block" id="contactname-block">
38 {include file="CRM/Contact/Page/Inline/ContactName.tpl"}
42 <div class="crm-actions-ribbon">
44 {assign var='urlParams' value="reset=1"}
46 {assign var='urlParams' value=$urlParams|cat:"&key=$searchKey"}
49 {assign var='urlParams' value=$urlParams|cat:"&context=$context"}
52 {* Include the Actions and Edit buttons if user has 'edit' permission and contact is NOT in trash. *}
53 {if $permission EQ 'edit' and !$isDeleted}
54 {if call_user_func(array('CRM_Core_Permission','check'), 'access CiviCRM')}
55 <li class="crm-contact-activity crm-summary-block">
56 {include file="CRM/Contact/Page/Inline/Actions.tpl"}
59 {if call_user_func(array('CRM_Core_Permission','check'), 'edit my contact')}
61 {assign var='editParams' value=$urlParams|cat:"&action=update&cid=$contactId"}
62 <a href="{crmURL p='civicrm/contact/add' q=$editParams}" class="edit button" title="{ts}Edit{/ts}">
63 <span><div class="icon edit-icon"></div>{ts}Edit{/ts}</span>
69 {* Check for permissions to provide Restore and Delete Permanently buttons for contacts that are in the trash. *}
70 {if (call_user_func(array('CRM_Core_Permission','check'), 'access deleted contacts') and
72 <li class="crm-contact-restore">
73 <a href="{crmURL p='civicrm/contact/view/delete' q="reset=1&cid=$contactId&restore=1"}" class="delete button" title="{ts}Restore{/ts}">
74 <span><div class="icon restore-icon"></div>{ts}Restore from Trash{/ts}</span>
78 {if call_user_func(array('CRM_Core_Permission','check'), 'delete contacts')}
79 <li class="crm-contact-permanently-delete">
80 <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}">
81 <span><div class="icon delete-icon"></div>{ts}Delete Permanently{/ts}</span>
86 {elseif call_user_func(array('CRM_Core_Permission','check'), 'delete contacts')}
87 {assign var='deleteParams' value="&reset=1&delete=1&cid=$contactId"}
88 <li class="crm-delete-action crm-contact-delete">
89 <a href="{crmURL p='civicrm/contact/view/delete' q=$deleteParams}" class="delete button" title="{ts}Delete{/ts}">
90 <span><div class="icon delete-icon"></div>{ts}Delete Contact{/ts}</span>
95 {* Previous and Next contact navigation when accessing contact summary from search results. *}
97 <li class="crm-next-action">
98 {help id="id-next-prev-buttons"}
102 {assign var='viewParams' value=$urlParams|cat:"&cid=$nextContactID"}
103 <li class="crm-next-action">
104 <a href="{crmURL p='civicrm/contact/view' q=$viewParams}" class="view button" title="{$nextContactName}">
105 <span title="{$nextContactName}"><div class="icon next-icon"></div>{ts}Next{/ts}</span>
110 {assign var='viewParams' value=$urlParams|cat:"&cid=$prevContactID"}
111 <li class="crm-previous-action">
112 <a href="{crmURL p='civicrm/contact/view' q=$viewParams}" class="view button" title="{$prevContactName}">
113 <span title="{$prevContactName}"><div class="icon previous-icon"></div>{ts}Previous{/ts}</span>
120 {if !empty($groupOrganizationUrl)}
121 <li class="crm-contact-associated-groups">
122 <a href="{$groupOrganizationUrl}" class="associated-groups button" title="{ts}Associated Multi-Org Group{/ts}">
123 <span><div class="icon associated-groups-icon"></div>{ts}Associated Multi-Org Group{/ts}</span>
128 <div class="clear"></div>
129 </div><!-- .crm-actions-ribbon -->
131 <div class="crm-block crm-content-block crm-contact-page crm-inline-edit-container">
132 <div id="mainTabContainer" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
133 <ul class="crm-contact-tabs-list">
134 <li id="tab_summary" class="crm-tab-button">
135 <a href="#contact-summary" title="{ts}Summary{/ts}">
136 <span> </span> {ts}Summary{/ts}
140 {foreach from=$allTabs key=tabName item=tabValue}
141 <li id="tab_{$tabValue.id}" class="crm-tab-button crm-count-{$tabValue.count}">
142 <a href="{$tabValue.url}" title="{$tabValue.title}">
143 <span> </span> {$tabValue.title}
144 <em>{$tabValue.count}</em>
150 <div id="contact-summary" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
151 {if (isset($hookContentPlacement) and ($hookContentPlacement neq 3)) or empty($hookContentPlacement)}
153 {if !empty($hookContent) and isset($hookContentPlacement) and $hookContentPlacement eq 2}
154 {include file="CRM/Contact/Page/View/SummaryHook.tpl"}
157 <div class="contactTopBar contact_panel">
158 <div class="contactCardLeft">
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"}
164 </div> <!-- end of left side -->
165 <div class="contactCardRight">
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"}" title="{ts}Edit Tags{/ts}">{ts}Tags{/ts}</a>
177 <div class="crm-content" id="tags">{$contactTag}</div>
179 <div class="crm-summary-row">
180 <div class="crm-label">{ts}Contact Type{/ts}</div>
181 <div class="crm-content crm-contact_type_label">
182 {if isset($contact_type_label)}{$contact_type_label}{/if}
186 <div class="crm-summary-row">
187 <div class="crm-label">
188 {ts}CiviCRM 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" href="{$userRecordUrl}">{$userRecordId}</a>
202 </div> <!-- end of right side -->
204 <div class="contact_details">
205 <div class="contact_panel">
206 <div class="contactCardLeft">
209 <div class="crm-summary-email-block crm-summary-block" id="email-block">
210 {include file="CRM/Contact/Page/Inline/Email.tpl"}
214 <div class="crm-summary-website-block crm-summary-block" id="website-block">
215 {include file="CRM/Contact/Page/Inline/Website.tpl"}
219 </div><!-- #contactCardLeft -->
221 <div class="contactCardRight">
224 <div class="crm-summary-phone-block crm-summary-block" id="phone-block">
225 {include file="CRM/Contact/Page/Inline/Phone.tpl"}
229 <div class="crm-summary-im-block crm-summary-block" id="im-block">
230 {include file="CRM/Contact/Page/Inline/IM.tpl"}
234 <div class="crm-summary-openid-block crm-summary-block" id="openid-block">
235 {include file="CRM/Contact/Page/Inline/OpenID.tpl"}
239 </div><!-- #contactCardRight -->
241 <div class="clear"></div>
242 </div><!-- #contact_panel -->
244 <div class="contact_panel">
245 {assign var='locationIndex' value=1}
247 {foreach from=$address item=add key=locationIndex}
248 <div class="{if $locationIndex is odd}contactCardLeft{else}contactCardRight{/if} crm-address_{$locationIndex} crm-address-block crm-summary-block">
249 {include file="CRM/Contact/Page/Inline/Address.tpl"}
252 {assign var='locationIndex' value=$locationIndex+1}
255 {if $permission EQ 'edit'}
256 {assign var='add' value=0}
257 <div class="{if $locationIndex is odd}contactCardLeft{else}contactCardRight{/if} crm-address-block crm-summary-block">
258 {include file="CRM/Contact/Page/Inline/Address.tpl"}
262 </div> <!-- end of contact panel -->
264 <div class="contact_panel">
265 {if $showCommunicationPreferences}
266 <div class="contactCardLeft">
267 <div class="crm-summary-comm-pref-block">
268 <div class="crm-summary-block" id="communication-pref-block" >
269 {include file="CRM/Contact/Page/Inline/CommunicationPreferences.tpl"}
272 </div> <!-- contactCardLeft -->
274 {if $contact_type eq 'Individual' AND $showDemographics}
275 <div class="contactCardRight">
276 <div class="crm-summary-demographic-block">
277 <div class="crm-summary-block" id="demographic-block">
278 {include file="CRM/Contact/Page/Inline/Demographics.tpl"}
281 </div> <!-- contactCardRight -->
283 <div class="clear"></div>
284 <div class="separator"></div>
285 </div> <!-- contact panel -->
286 </div><!--contact_details-->
289 <div id="customFields">
290 <div class="contact_panel">
291 <div class="contactCardLeft">
292 {include file="CRM/Contact/Page/View/CustomDataView.tpl" side='1'}
293 </div><!--contactCardLeft-->
295 <div class="contactCardRight">
296 {include file="CRM/Contact/Page/View/CustomDataView.tpl" side='0'}
299 <div class="clear"></div>
304 {if !empty($hookContent) and isset($hookContentPlacement) and $hookContentPlacement eq 1}
305 {include file="CRM/Contact/Page/View/SummaryHook.tpl"}
308 {include file="CRM/Contact/Page/View/SummaryHook.tpl"}
311 <div class="clear"></div>
313 <div class="clear"></div>
314 </div><!-- /.crm-content-block -->
316 <script type="text/javascript">
319 //explicitly stop spinner
320 function stopSpinner( ) {
321 $('li.crm-tab-button span').text(' ');
324 var selectedTab = '{if !empty($selectedChild)}{$selectedChild}{else}summary{/if}';
325 var tabIndex = $('#tab_' + selectedTab).prevAll().length;
326 var spinnerImage = '<img src="{$config->resourceBase}i/loading.gif" style="width:10px;height:10px"/>';
328 $("#mainTabContainer").tabs({ selected: tabIndex, spinner: spinnerImage, cache: true, load: stopSpinner});
329 $(".crm-tab-button").addClass("ui-corner-bottom");
332 $('body').click(function() {
333 cj('#crm-contact-actions-list').hide();
342 <script type="text/javascript">
343 cj(document).ready(function($) {
344 $('.crm-inline-edit-container').crmFormContactLock({
345 ignoreLabel: "{/literal}{ts escape='js'}Ignore{/ts}{literal}",
346 saveAnywayLabel: "{/literal}{ts escape='js'}Save Anyway{/ts}{literal}",
347 reloadLabel: "{/literal}{ts escape='js'}Reload Page{/ts}{literal}"
353 {* jQuery validate *}
354 {include file="CRM/Form/validate.tpl" form=0}