diff --git a/lib/Search/UI/SearchResultsController.php b/lib/Search/UI/SearchResultsController.php index 1690ef7bf1b..d9c1d276cde 100644 --- a/lib/Search/UI/SearchResultsController.php +++ b/lib/Search/UI/SearchResultsController.php @@ -141,7 +141,17 @@ public function display(): void $smarty->assign('results', $this->results); $smarty->assign('APP', $app_strings); try { - $smarty->assign('resultsAsBean', $this->results->getHitsAsBeans()); + $resultsAsBean = $this->results->getHitsAsBeans(); + global $app_list_strings; + $moduleLabels = $app_list_strings['moduleList']; + //Redundency for any beans that don't have labels + foreach ($resultsAsBean as $module => $beans) { + if(!isset($moduleLabels[$module])) { + $moduleLabels[$module] = $module; + } + } + $smarty->assign('moduleLabels', $moduleLabels); + $smarty->assign('resultsAsBean', $resultsAsBean); } catch (\SuiteCRM\Exception\Exception $e) { LoggerManager::getLogger()->fatal("Failed to retrieve ElasticSearch options"); } diff --git a/lib/Search/UI/templates/search.results.tpl b/lib/Search/UI/templates/search.results.tpl index 3cf5a520730..3bf07b5bfd9 100644 --- a/lib/Search/UI/templates/search.results.tpl +++ b/lib/Search/UI/templates/search.results.tpl @@ -91,7 +91,7 @@ {/if} {foreach from=$resultsAsBean item=beans key=module} -

{$module}

+

{$moduleLabels[$module]}