CRM-18390 - Adding contact summary tab dynamically
authoromar abu hussein <opetmar91@gmail.com>
Mon, 11 Apr 2016 22:05:13 +0000 (01:05 +0300)
committeromar abu hussein <opetmar91@gmail.com>
Tue, 12 Apr 2016 08:49:40 +0000 (09:49 +0100)
CRM/Contact/Page/View/Summary.php
templates/CRM/Contact/Page/View/Summary.tpl

index 11eb55571bdeac7b57d3e6ba8b71adf0cbd5594f..13f46994c1d8f725a2b3d4741e1965e78a3ca24a 100644 (file)
@@ -392,6 +392,13 @@ class CRM_Contact_Page_View_Summary extends CRM_Contact_Page_View {
     CRM_Utils_Hook::tabs($allTabs, $this->_contactId);
     CRM_Utils_Hook::tabset('civicrm/contact/view', $allTabs, $context);
 
+    $allTabs[] = array(
+      'id' => 'summary',
+      'url' => '#contact-summary',
+      'title' => ts('Summary'),
+      'weight' => 0,
+    );
+
     // now sort the tabs based on weight
     usort($allTabs, array('CRM_Utils_Sort', 'cmpFunc'));
 
index d81a00e0d03ee6f2d884443e3b25fcd5b801e276..a49c63c5c16a445c28380c4e5dc2a2c44a551524 100644 (file)
   <div class="crm-block crm-content-block crm-contact-page crm-inline-edit-container">
     <div id="mainTabContainer">
       <ul class="crm-contact-tabs-list">
-        <li id="tab_summary" class="crm-tab-button ui-corner-all">
-          <a href="#contact-summary" title="{ts}Summary{/ts}">
-            <span> </span> {ts}Summary{/ts}
-            <em></em>
-          </a>
-        </li>
         {foreach from=$allTabs key=tabName item=tabValue}
           <li id="tab_{$tabValue.id}" class="crm-tab-button ui-corner-all crm-count-{$tabValue.count}{if isset($tabValue.class)} {$tabValue.class}{/if}">
             <a href="{$tabValue.url}" title="{$tabValue.title}">