28 lines
1.1 KiB
Text
28 lines
1.1 KiB
Text
- form_field_classes = local_assigns[:admin_view] || !Feature.enabled?(:project_list_filter_bar) ? 'input-short js-projects-list-filter' : ''
|
|
- placeholder = local_assigns[:search_form_placeholder] ? search_form_placeholder : 'Filter by name...'
|
|
|
|
= form_tag filter_projects_path, method: :get, class: 'project-filter-form qa-project-filter-form', id: 'project-filter-form' do |f|
|
|
= search_field_tag :name, params[:name],
|
|
placeholder: placeholder,
|
|
class: "project-filter-form-field form-control #{form_field_classes}",
|
|
spellcheck: false,
|
|
id: 'project-filter-form-field',
|
|
tabindex: "2",
|
|
autofocus: local_assigns[:autofocus]
|
|
|
|
- if local_assigns[:icon]
|
|
= sprite_icon('search', css_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]
|
|
|
|
= render_if_exists 'shared/projects/search_fields'
|