From c3f63d6f779ac5178841c1412cedf195047a2f85 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Wed, 23 Sep 2015 15:33:36 +0200 Subject: Fix search for ci projects and cleanup unnecessary code Signed-off-by: Dmitriy Zaporozhets --- app/controllers/ci/projects_controller.rb | 8 +------- app/views/ci/projects/index.html.haml | 6 ------ 2 files changed, 1 insertion(+), 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 -- cgit v1.2.1