From e1ea3ee36e3a9ad6c0949869065bdfb9cf7d45ec Mon Sep 17 00:00:00 2001 From: Dave Greenberg Date: Sun, 2 Feb 2014 19:24:35 -0800 Subject: [PATCH] CRM-13833 - Add contact summary link to soft credit contacts in Soft Credit report. ---------------------------------------- * CRM-13833: Implement Soft Credit Types http://issues.civicrm.org/jira/browse/CRM-13833 --- CRM/Report/Form/Contribute/SoftCredit.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/CRM/Report/Form/Contribute/SoftCredit.php b/CRM/Report/Form/Contribute/SoftCredit.php index e0c6c853c9..af128b9454 100644 --- a/CRM/Report/Form/Contribute/SoftCredit.php +++ b/CRM/Report/Form/Contribute/SoftCredit.php @@ -506,6 +506,18 @@ GROUP BY {$this->_aliases['civicrm_contribution']}.currency $entryFound = TRUE; } + // convert soft credit contact name to link + if (array_key_exists('civicrm_contact_display_name_creditor', $row) && !empty($rows[$rowNum]['civicrm_contact_display_name_creditor']) && + array_key_exists('civicrm_contact_id_creditor', $row) + ) { + $url = CRM_Utils_System::url("civicrm/contact/view", + 'reset=1&cid=' . $row['civicrm_contact_id_creditor'], + $this->_absoluteUrl + ); + $rows[$rowNum]['civicrm_contact_display_name_creditor_link'] = $url; + $rows[$rowNum]['civicrm_contact_display_name_creditor_hover'] = ts("view contact summary"); + } + // make subtotals look nicer if (array_key_exists('civicrm_contact_id_constituent', $row) && !$row['civicrm_contact_id_constituent'] -- 2.25.1