gitlab-org--gitlab-foss/app/views/shared/projects/_search_form.html.haml
Gabriel Mazetto fe0824d6a4 Add render_if_exists to inject additional search field in EE
This allows EE code to reuse the search partial and append additional
query parameters to it, and have it preserved when searching.
2018-11-01 18:05:17 +01:00

25 lines
886 B
Text

= 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]
= render_if_exists 'shared/projects/search_fields'