Skip to content
Snippets Groups Projects
Commit 262a3dd4 authored by Phil Hughes's avatar Phil Hughes
Browse files

Humanize scope text

parent 3b5879e5
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
 
Loading
Loading
Loading
Loading
@@ -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]}
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment