2019-04-12 15:11:46 +00:00
|
|
|
- form_field_classes = local_assigns[:admin_view] || !Feature.enabled?(:project_list_filter_bar) ? 'input-short js-projects-list-filter' : ''
|
2019-04-02 01:12:29 +00:00
|
|
|
- placeholder = local_assigns[:search_form_placeholder] ? search_form_placeholder : 'Filter by name...'
|
|
|
|
|
2019-06-12 02:09:07 +00:00
|
|
|
= form_tag filter_projects_path, method: :get, class: 'project-filter-form qa-project-filter-form', id: 'project-filter-form' do |f|
|
2017-03-03 10:13:03 +00:00
|
|
|
= search_field_tag :name, params[:name],
|
2019-04-02 01:12:29 +00:00
|
|
|
placeholder: placeholder,
|
2019-04-05 12:41:28 +00:00
|
|
|
class: "project-filter-form-field form-control #{form_field_classes}",
|
2017-03-03 10:13:03 +00:00
|
|
|
spellcheck: false,
|
|
|
|
id: 'project-filter-form-field',
|
|
|
|
autofocus: local_assigns[:autofocus]
|
|
|
|
|
|
|
|
- if local_assigns[:icon]
|
2020-10-07 21:08:21 +00:00
|
|
|
= sprite_icon('search', css_class: 'search-icon')
|
2017-03-03 10:13:03 +00:00
|
|
|
|
|
|
|
- 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]
|
2018-11-01 14:20:22 +00:00
|
|
|
|
|
|
|
= render_if_exists 'shared/projects/search_fields'
|