Commit a43a3803 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

Increase amount of search results for issues, mr, projects

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