From ae94c3e3e5362afe61f2da4aa11ed67a2d03532e Mon Sep 17 00:00:00 2001 From: Ravish Nair Date: Fri, 12 Jul 2013 16:42:55 +0530 Subject: [PATCH] -- CRM-12914 made email addresses clickable in profile search results ---------------------------------------- * CRM-12914: Make email addresses clickable in search results http://issues.civicrm.org/jira/browse/CRM-12914 --- CRM/Profile/Selector/Listings.php | 4 +++- templates/CRM/Profile/Page/Listings.tpl | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/CRM/Profile/Selector/Listings.php b/CRM/Profile/Selector/Listings.php index 2d3aacbea1..65e08c0471 100644 --- a/CRM/Profile/Selector/Listings.php +++ b/CRM/Profile/Selector/Listings.php @@ -306,6 +306,7 @@ class CRM_Profile_Selector_Listings extends CRM_Core_Selector_Base implements CR 'name' => ts('Name'), 'sort' => 'sort_name', 'direction' => CRM_Utils_Sort::ASCENDING, + 'field_name' => 'sort_name', ), ); @@ -357,6 +358,7 @@ class CRM_Profile_Selector_Listings extends CRM_Core_Selector_Base implements CR 'name' => $field['title'], 'sort' => $name, 'direction' => $direction, + 'field_name' => CRM_Core_BAO_UFField::isValidFieldName($name) ? $name : $fieldName, ); $direction = CRM_Utils_Sort::DONTCARE; @@ -583,7 +585,7 @@ class CRM_Profile_Selector_Listings extends CRM_Core_Selector_Base implements CR $showProfileOverlay ); if ($result->sort_name) { - $row['sort_name'] = $result->sort_name; + $row[] = $result->sort_name; $empty = FALSE; } else { diff --git a/templates/CRM/Profile/Page/Listings.tpl b/templates/CRM/Profile/Page/Listings.tpl index 21c579906e..66edb0ce74 100644 --- a/templates/CRM/Profile/Page/Listings.tpl +++ b/templates/CRM/Profile/Page/Listings.tpl @@ -73,8 +73,12 @@ {counter start=0 skip=1 print=false} {foreach from=$rows item=row name=listings} - {foreach from=$row item=value} - {$value} + {foreach from=$row key=index item=value} + {if $columnHeaders.$index.field_name} + {$value} + {else} + {$value} + {/if} {/foreach} {/foreach} -- 2.25.1