diff options
-rw-r--r-- | app/helpers/search_helper.rb | 4 | ||||
-rw-r--r-- | app/views/search/_results.html.haml | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb index 1b8053d1b1c..43169d1c9db 100644 --- a/app/helpers/search_helper.rb +++ b/app/helpers/search_helper.rb @@ -19,13 +19,13 @@ module SearchHelper end end - def search_entries_info(collection) + def search_entries_info(collection, scope, term) if collection.count > 0 from = collection.offset_value + 1 to = collection.offset_value + collection.length count = collection.count - "Showing #{from} - #{to} of #{count} results for \"#{@search_term}\"" + "Showing #{from} - #{to} of #{count} #{scope.humanize(capitalize: false)} for \"#{term}\"" end end diff --git a/app/views/search/_results.html.haml b/app/views/search/_results.html.haml index a7615f580f0..252c1508a50 100644 --- a/app/views/search/_results.html.haml +++ b/app/views/search/_results.html.haml @@ -2,7 +2,7 @@ = render partial: "search/results/empty" - else .gray-content-block - = search_entries_info @objects + = search_entries_info @objects, @scope, @search_term - unless @show_snippets - if @project in project #{link_to @project.name_with_namespace, [@project.namespace.becomes(Namespace), @project]} |