CRM-14919 Add icon for related contact in listing in the relationship tab
authorNileema <nileema@nileema.(none)>
Fri, 27 Jun 2014 09:35:32 +0000 (15:05 +0530)
committerNileema <nileema@nileema.(none)>
Fri, 27 Jun 2014 09:37:25 +0000 (15:07 +0530)
----------------------------------------
* CRM-14919: Add icon for related contact in listing in the relationship tab
  https://issues.civicrm.org/jira/browse/CRM-14919

CRM/Contact/BAO/Relationship.php
css/civicrm.css

index e963c3d1789f679fe17e6364a46015e9d98292b7..cff60bccbb81756f42c92b68a2f596384b007ae4 100644 (file)
@@ -1705,7 +1705,14 @@ AND cc.sort_name LIKE '%$name%'";
 
       // format params
       foreach ($relationships as $relationshipId => $values) {
-        $contactRelationships[$relationshipId]['name'] = CRM_Utils_System::href(
+        //Add image icon for related contacts: CRM-14919
+        $subType = CRM_Contact_BAO_Contact::getContactSubType($values['cid']);
+        $cType = CRM_Contact_BAO_Contact::getContactType($values['cid']);
+        $icon = CRM_Contact_BAO_Contact_Utils::getImage($subType ? $subType : $cType,
+          FALSE,
+          $values['cid']
+        );
+        $contactRelationships[$relationshipId]['name'] = $icon.' '.CRM_Utils_System::href(
           $values['name'],
           'civicrm/contact/view',
           "reset=1&cid={$values['cid']}");
index 0d69e51b21acade55c674a3d214a90511fbec781..cd3980744c92d14dbeb21616c55e423fd6792ab8 100644 (file)
@@ -107,7 +107,7 @@ div.crm-container fieldset label{
 
 .crm-container tr {
   font-size: .95em;
-  background: none;
+  background: none !important;
 }
 
 .crm-container td {