Commit b04115b4 authored by colemanw's avatar colemanw

Add icons to contact summary tabs

parent b965352d
......@@ -130,6 +130,14 @@ class CRM_Campaign_Info extends CRM_Core_Component_Info {
return NULL;
}
/**
* @inheritDoc
* @return string
*/
public function getIcon() {
return 'crm-i fa-star-o';
}
/**
* @inheritDoc
* @return null
......
......@@ -176,6 +176,14 @@ class CRM_Case_Info extends CRM_Core_Component_Info {
);
}
/**
* @inheritDoc
* @return string
*/
public function getIcon() {
return 'crm-i fa-folder-open-o';
}
/**
* @inheritDoc
* @return array
......
......@@ -316,40 +316,47 @@ class CRM_Contact_Page_View_Summary extends CRM_Contact_Page_View {
'url' => '#contact-summary',
'title' => ts('Summary'),
'weight' => 0,
'icon' => 'crm-i fa-address-card-o'
],
[
'id' => 'activity',
'title' => ts('Activities'),
'class' => 'livePage',
'weight' => 70,
'icon' => 'crm-i fa-tasks',
],
[
'id' => 'rel',
'title' => ts('Relationships'),
'class' => 'livePage',
'weight' => 80,
'icon' => 'crm-i fa-handshake-o',
],
[
'id' => 'group',
'title' => ts('Groups'),
'class' => 'ajaxForm',
'weight' => 90,
'icon' => 'crm-i fa-users',
],
[
'id' => 'note',
'title' => ts('Notes'),
'class' => 'livePage',
'weight' => 100,
'icon' => 'crm-i fa-sticky-note-o',
],
[
'id' => 'tag',
'title' => ts('Tags'),
'weight' => 110,
'icon' => 'crm-i fa-tags',
],
[
'id' => 'log',
'title' => ts('Change Log'),
'weight' => 120,
'icon' => 'crm-i fa-history',
],
];
}
......@@ -391,6 +398,7 @@ class CRM_Contact_Page_View_Summary extends CRM_Contact_Page_View {
'weight' => $elem['weight'],
'count' => CRM_Contact_BAO_Contact::getCountComponent($u, $this->_contactId),
'class' => 'livePage',
'icon' => $component->getIcon(),
];
}
}
......@@ -431,6 +439,7 @@ class CRM_Contact_Page_View_Summary extends CRM_Contact_Page_View {
'count' => CRM_Contact_BAO_Contact::getCountComponent($id, $this->_contactId, $group['table_name']),
'hideCount' => !$group['is_multiple'],
'class' => 'livePage',
'icon' => 'crm-i fa-gear',
];
$weight += 10;
}
......
......@@ -164,6 +164,14 @@ class CRM_Contribute_Info extends CRM_Core_Component_Info {
);
}
/**
* @inheritDoc
* @return string
*/
public function getIcon() {
return 'crm-i fa-credit-card';
}
/**
* @inheritDoc
* Provides information about advanced search pane
......
......@@ -198,6 +198,15 @@ abstract class CRM_Core_Component_Info {
*/
abstract public function registerTab();
/**
* Get icon font class representing this component.
*
* @return string
*/
public function getIcon() {
return 'crm-i fa-puzzle-piece';
}
/**
* Provides information about advanced search pane
* offered by this component.
......
......@@ -143,6 +143,14 @@ class CRM_Event_Info extends CRM_Core_Component_Info {
);
}
/**
* @inheritDoc
* @return string
*/
public function getIcon() {
return 'crm-i fa-calendar';
}
/**
* @inheritDoc
* @return array
......
......@@ -121,6 +121,14 @@ class CRM_Grant_Info extends CRM_Core_Component_Info {
);
}
/**
* @inheritDoc
* @return string
*/
public function getIcon() {
return 'crm-i fa-money';
}
/**
* @inheritDoc
* @return array
......
......@@ -276,6 +276,14 @@ class CRM_Mailing_Info extends CRM_Core_Component_Info {
);
}
/**
* @inheritDoc
* @return string
*/
public function getIcon() {
return 'crm-i fa-envelope-o';
}
/**
* @inheritDoc
* @return array
......
......@@ -150,6 +150,14 @@ class CRM_Member_Info extends CRM_Core_Component_Info {
);
}
/**
* @inheritDoc
* @return string
*/
public function getIcon() {
return 'crm-i fa-id-badge';
}
/**
* @inheritDoc
* Provides information about advanced search pane
......
......@@ -136,6 +136,14 @@ class CRM_Pledge_Info extends CRM_Core_Component_Info {
);
}
/**
* @inheritDoc
* @return string
*/
public function getIcon() {
return 'crm-i fa-paper-plane';
}
/**
* @inheritDoc
* Provides information about advanced search pane
......
......@@ -164,6 +164,14 @@ class CRM_Report_Info extends CRM_Core_Component_Info {
return NULL;
}
/**
* @inheritDoc
* @return string
*/
public function getIcon() {
return 'crm-i fa-table';
}
/**
* @inheritDoc
* Provides information about advanced search pane
......
......@@ -126,6 +126,7 @@
{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|escape}">
<i class="{if $tabValue.icon}{$tabValue.icon}{else}crm-i fa-puzzle-piece{/if}"></i>
{$tabValue.title}
{if empty($tabValue.hideCount)}<em>{$tabValue.count}</em>{/if}
</a>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment