Commit c3f63d6f authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Fix search for ci projects and cleanup unnecessary code

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 31b15e3d
......@@ -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
......
......@@ -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
......
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