BigW Consortium Gitlab

_search_form.html.haml 832 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
= form_tag filter_projects_path, method: :get, class: 'project-filter-form', id: 'project-filter-form' do |f|
  = search_field_tag :name, params[:name],
    placeholder: 'Filter by name...',
    class: 'project-filter-form-field form-control input-short js-projects-list-filter',
    spellcheck: false,
    id: 'project-filter-form-field',
    tabindex: "2",
    autofocus: local_assigns[:autofocus]

  - if local_assigns[:icon]
    = icon("search", class: "search-icon")

  - if params[:sort].present?
    = hidden_field_tag :sort, params[:sort]

  - if params[:personal].present?
    = hidden_field_tag :personal, params[:personal]

  - if params[:archived].present?
    = hidden_field_tag :archived, params[:archived]

  - if params[:visibility_level].present?
    = hidden_field_tag :visibility_level, params[:visibility_level]