Commit a43a3803 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Increase amount of search results for issues, mr, projects

parent b58eeeaf
...@@ -11,7 +11,7 @@ class SearchContext ...@@ -11,7 +11,7 @@ class SearchContext
return result unless query.present? return result unless query.present?
projects = Project.where(id: project_ids) projects = Project.where(id: project_ids)
result[:projects] = projects.search(query).limit(10) result[:projects] = projects.search(query).limit(20)
# Search inside singe project # Search inside singe project
project = projects.first if projects.length == 1 project = projects.first if projects.length == 1
...@@ -19,8 +19,8 @@ class SearchContext ...@@ -19,8 +19,8 @@ class SearchContext
if params[:search_code].present? if params[:search_code].present?
result[:blobs] = project.repository.search_files(query, params[:repository_ref]) unless project.empty_repo? result[:blobs] = project.repository.search_files(query, params[:repository_ref]) unless project.empty_repo?
else else
result[:merge_requests] = MergeRequest.where(project_id: project_ids).search(query).limit(10) result[:merge_requests] = MergeRequest.where(project_id: project_ids).search(query).limit(20)
result[:issues] = Issue.where(project_id: project_ids).search(query).limit(10) result[:issues] = Issue.where(project_id: project_ids).search(query).limit(20)
result[:wiki_pages] = [] result[:wiki_pages] = []
end end
result result
......
...@@ -9,7 +9,6 @@ ...@@ -9,7 +9,6 @@
%ul.well-list.issues-list %ul.well-list.issues-list
- group[1].each do |issue| - group[1].each do |issue|
= render 'projects/issues/issue', issue: issue = render 'projects/issues/issue', issue: issue
%hr
= paginate @issues, theme: "gitlab" = paginate @issues, theme: "gitlab"
- else - else
%p.nothing_here_message Nothing to show here %p.nothing_here_message Nothing to show here
......
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
%ul.well-list.mr-list %ul.well-list.mr-list
- group[1].each do |merge_request| - group[1].each do |merge_request|
= render 'projects/merge_requests/merge_request', merge_request: merge_request = render 'projects/merge_requests/merge_request', merge_request: merge_request
%hr
= paginate @merge_requests, theme: "gitlab" = paginate @merge_requests, theme: "gitlab"
- else - else
......
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