dev-core#564: Differentiate case relationships in Contact Summary page
authorMonish Deb <deb.monish@gmail.com>
Fri, 30 Nov 2018 12:16:49 +0000 (17:46 +0530)
committerMonish Deb <deb.monish@gmail.com>
Wed, 2 Jan 2019 04:49:00 +0000 (10:19 +0530)
CRM/Contact/BAO/Relationship.php

index 9d21c6a4ff0a60cffe3395d8972051bf5f9bfac3..c7f13782d2ebc2f0bcab3dacac07b6dce741e21f 100644 (file)
@@ -1434,6 +1434,7 @@ LEFT JOIN  civicrm_country ON (civicrm_address.country_id = civicrm_country.id)
               if ($values[$rid]['rtype'] == 'b_a') {
                 $replace['clientid'] = $values[$rid]['cid'];
               }
+              $values[$rid]['case'] = '<a href="' . CRM_Utils_System::url('civicrm/case/ajax/details', sprintf('caseId=%d&cid=%d&snippet=4', $values[$rid]['case_id'], $values[$rid]['cid'])) . '" class="action-item crm-hover-button crm-summary-link"><i class="crm-i fa-folder-open-o"></i></a>';
             }
           }
 
@@ -2120,7 +2121,7 @@ AND cc.sort_name LIKE '%$name%'";
             'civicrm/contact/view',
             "reset=1&cid={$values['cid']}");
 
-        $relationship['relation'] = CRM_Utils_System::href(
+        $relationship['relation'] = CRM_Utils_Array::value('case', $values, '') . CRM_Utils_System::href(
           $values['relation'],
           'civicrm/contact/view/rel',
           "action=view&reset=1&cid={$values['cid']}&id={$values['id']}&rtype={$values['rtype']}");