summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2016-04-21 11:05:50 +0100
committerPhil Hughes <me@iamphill.com>2016-04-26 09:03:04 +0100
commit06276bd3550e589c520027c16f108b92a48fb44a (patch)
tree21af4ec096c8a2e3622c50c2b72b28353beadf6b
parent3137559dfd45ff0e7fa6653ed1ba3d75836e4c45 (diff)
downloadgitlab-ce-06276bd3550e589c520027c16f108b92a48fb44a.tar.gz
Correctly shows no results text
Correct search results count
-rw-r--r--app/helpers/search_helper.rb2
-rw-r--r--app/views/search/_results.html.haml2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
index 43169d1c9db..7f585cd5dd9 100644
--- a/app/helpers/search_helper.rb
+++ b/app/helpers/search_helper.rb
@@ -23,7 +23,7 @@ module SearchHelper
if collection.count > 0
from = collection.offset_value + 1
to = collection.offset_value + collection.length
- count = collection.count
+ count = collection.total_count
"Showing #{from} - #{to} of #{count} #{scope.humanize(capitalize: false)} for \"#{term}\""
end
diff --git a/app/views/search/_results.html.haml b/app/views/search/_results.html.haml
index 252c1508a50..204f5a36f85 100644
--- a/app/views/search/_results.html.haml
+++ b/app/views/search/_results.html.haml
@@ -1,4 +1,4 @@
-- if @search_results.empty?
+- if @objects.empty?
= render partial: "search/results/empty"
- else
.gray-content-block