diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-07 22:51:36 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-08-07 22:51:36 +0300 |
commit | a43a38039476598fe1e959b29d7033a5b1b1c8d0 (patch) | |
tree | db03d3e034546ae61de75b16c1da6f8126df39c9 | |
parent | b58eeeaf105f345702f55d337bd49803a8601fbe (diff) | |
download | gitlab-ce-a43a38039476598fe1e959b29d7033a5b1b1c8d0.tar.gz |
Increase amount of search results for issues, mr, projects
-rw-r--r-- | app/contexts/search_context.rb | 6 | ||||
-rw-r--r-- | app/views/shared/_issues.html.haml | 1 | ||||
-rw-r--r-- | app/views/shared/_merge_requests.html.haml | 1 |
3 files changed, 3 insertions, 5 deletions
diff --git a/app/contexts/search_context.rb b/app/contexts/search_context.rb index 22cda709f69..9e49e44496b 100644 --- a/app/contexts/search_context.rb +++ b/app/contexts/search_context.rb @@ -11,7 +11,7 @@ class SearchContext 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 @@ class SearchContext 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 diff --git a/app/views/shared/_issues.html.haml b/app/views/shared/_issues.html.haml index 9fa574cebc0..6f4852d8785 100644 --- a/app/views/shared/_issues.html.haml +++ b/app/views/shared/_issues.html.haml @@ -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 diff --git a/app/views/shared/_merge_requests.html.haml b/app/views/shared/_merge_requests.html.haml index c83620dd7f4..eed52d61530 100644 --- a/app/views/shared/_merge_requests.html.haml +++ b/app/views/shared/_merge_requests.html.haml @@ -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 |