diff --git a/rhodecode/apps/home/views.py b/rhodecode/apps/home/views.py --- a/rhodecode/apps/home/views.py +++ b/rhodecode/apps/home/views.py @@ -449,6 +449,7 @@ class HomeView(BaseAppView): 'id': -10, 'value': query, 'value_display': label, + 'value_icon': '', 'type': 'search', 'subtype': 'repo', 'url': h.route_path('search_repo', @@ -466,6 +467,7 @@ class HomeView(BaseAppView): 'id': -20, 'value': query, 'value_display': label, + 'value_icon': '', 'type': 'search', 'subtype': 'repo', 'url': h.route_path('search_repo', @@ -491,6 +493,7 @@ class HomeView(BaseAppView): 'id': -30, 'value': query, 'value_display': label, + 'value_icon': '', 'type': 'search', 'subtype': 'repo_group', 'url': h.route_path('search_repo_group', @@ -508,6 +511,7 @@ class HomeView(BaseAppView): 'id': -40, 'value': query, 'value_display': label, + 'value_icon': '', 'type': 'search', 'subtype': 'repo_group', 'url': h.route_path('search_repo_group', @@ -529,6 +533,7 @@ class HomeView(BaseAppView): 'id': -1, 'value': query, 'value_display': u'File search for: `{}`'.format(query), + 'value_icon': '', 'type': 'search', 'subtype': 'global', 'url': h.route_path('search', @@ -539,6 +544,7 @@ class HomeView(BaseAppView): 'id': -2, 'value': query, 'value_display': u'Commit search for: `{}`'.format(query), + 'value_icon': '', 'type': 'search', 'subtype': 'global', 'url': h.route_path('search', diff --git a/rhodecode/templates/base/base.mako b/rhodecode/templates/base/base.mako --- a/rhodecode/templates/base/base.mako +++ b/rhodecode/templates/base/base.mako @@ -889,6 +889,7 @@ var searchType = data['type']; var searchSubType = data['subtype']; var valueDisplay = data['value_display']; + var valueIcon = data['value_icon']; var pattern = '(' + escapeRegExChars(value) + ')'; @@ -906,7 +907,12 @@ } // full text search/hints else if (searchType === 'search') { - icon += ' '; + if (valueIcon === undefined) { + icon += ' '; + } else { + icon += valueIcon + ' '; + } + if (searchSubType !== undefined && searchSubType == 'repo') { valueDisplay += '
repository
'; }