summaryrefslogtreecommitdiff
path: root/app/helpers/search_helper.rb
diff options
context:
space:
mode:
authorFrancisco Javier López <fjlopez@gitlab.com>2018-06-04 11:41:37 +0000
committerDouwe Maan <douwe@gitlab.com>2018-06-04 11:41:37 +0000
commit7350eb1fa83662d4aaa7541acb387b3742ba9788 (patch)
tree881a23cd8807f2247707c875bc1be1502ff04ace /app/helpers/search_helper.rb
parent0b4f9ff4068af6776b495d9332aeecf58e48786f (diff)
downloadgitlab-ce-7350eb1fa83662d4aaa7541acb387b3742ba9788.tar.gz
Add ability to search wiki titles
Diffstat (limited to 'app/helpers/search_helper.rb')
-rw-r--r--app/helpers/search_helper.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
index 761c1252fc8..f7dafca7834 100644
--- a/app/helpers/search_helper.rb
+++ b/app/helpers/search_helper.rb
@@ -25,14 +25,22 @@ module SearchHelper
return unless collection.count > 0
from = collection.offset_value + 1
- to = collection.offset_value + collection.length
+ to = collection.offset_value + collection.count
count = collection.total_count
"Showing #{from} - #{to} of #{count} #{scope.humanize(capitalize: false)} for \"#{term}\""
end
+ def find_project_for_result_blob(result)
+ @project
+ end
+
def parse_search_result(result)
- Gitlab::ProjectSearchResults.parse_search_result(result)
+ result
+ end
+
+ def search_blob_title(project, filename)
+ filename
end
private