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

Add simple search to projects in public area

parent 8cd41daaac08
......@@ -7,6 +7,7 @@ class Public::ProjectsController < ApplicationController
def index
@projects = Project.public_only
@projects =[:search]) if params[:search].present?
@projects = @projects.includes(:namespace).order("namespaces.path, ASC").page(params[:page]).per(20)
Projects (#{@projects.total_count})
%small with read-only access
Projects (#{@projects.total_count})
%small with read-only access
= form_tag public_projects_path, method: :get, class: 'form-inline' do |f|
= search_field_tag :search, params[:search], placeholder: "gitlab-ci", class: "span3 search-text-input", id: "projects_search"
= submit_tag 'Search', class: "btn btn-primary wide"
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