Commit 262a3dd4 authored by Phil Hughes's avatar Phil Hughes

Humanize scope text

parent 3b5879e5
......@@ -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
......
......@@ -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]}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment