summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-23 15:33:36 +0200
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-09-23 15:33:36 +0200
commitc3f63d6f779ac5178841c1412cedf195047a2f85 (patch)
tree10b278f62356291d8f109c7f9bb94b3dc95d856d
parent31b15e3dce2817d8cd6d70cda97c6b9dbf5c7f8a (diff)
downloadgitlab-ce-c3f63d6f779ac5178841c1412cedf195047a2f85.tar.gz
Fix search for ci projects and cleanup unnecessary code
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
-rw-r--r--app/controllers/ci/projects_controller.rb8
-rw-r--r--app/views/ci/projects/index.html.haml6
2 files changed, 1 insertions, 13 deletions
diff --git a/app/controllers/ci/projects_controller.rb b/app/controllers/ci/projects_controller.rb
index 6b7545e5447..f3ee55bfbd1 100644
--- a/app/controllers/ci/projects_controller.rb
+++ b/app/controllers/ci/projects_controller.rb
@@ -22,15 +22,9 @@ module Ci
@projects = @projects.where(gitlab_id: current_user.authorized_projects.pluck(:id))
end
+ @projects = @projects.search(params[:search]) if params[:search].present?
@projects = @projects.includes(:last_commit).order('ci_commits.created_at DESC')
@projects = @projects.page(params[:page]).per(40)
-
- respond_to do |format|
- format.json do
- pager_json("ci/projects/index", @total_count)
- end
- format.html
- end
end
def show
diff --git a/app/views/ci/projects/index.html.haml b/app/views/ci/projects/index.html.haml
index efb1a1e4208..046095a3c12 100644
--- a/app/views/ci/projects/index.html.haml
+++ b/app/views/ci/projects/index.html.haml
@@ -2,12 +2,6 @@
.gray-content-block.top-block
= render "search"
.projects
- .gray-content-block.clearfix.light.second-block
- .pull-left.fetch-status
- - if params[:search].present?
- by keyword: "#{params[:search]}",
- #{@total_count} projects
-
.wide-table-holder
%table.table.projects-table.content-list
%thead