2022-05-12 23:08:13 -04:00
|
|
|
#js-header-search.header-search.is-not-active.gl-relative.gl-w-full{ data: { 'search-context' => header_search_context.to_json,
|
2022-03-09 22:08:56 -05:00
|
|
|
'search-path' => search_path,
|
|
|
|
'issues-path' => issues_dashboard_path,
|
|
|
|
'mr-path' => merge_requests_dashboard_path,
|
|
|
|
'autocomplete-path' => search_autocomplete_path } }
|
|
|
|
= form_tag search_path, method: :get do |_f|
|
|
|
|
.gl-search-box-by-type
|
|
|
|
= sprite_icon('search', css_class: 'gl-search-box-by-type-search-icon gl-icon')
|
2022-04-05 17:08:46 -04:00
|
|
|
%input{ id: 'search', name: 'search', type: "text", placeholder: s_('GlobalSearch|Search GitLab'),
|
|
|
|
class: 'form-control gl-form-input gl-search-box-by-type-input',
|
|
|
|
autocomplete: 'off',
|
|
|
|
data: { qa_selector: 'search_box' } }
|
2022-03-09 22:08:56 -05:00
|
|
|
|
|
|
|
= hidden_field_tag :group_id, header_search_context[:group][:id] if header_search_context[:group]
|
|
|
|
= hidden_field_tag :project_id, header_search_context[:project][:id] if header_search_context[:project]
|
|
|
|
|
|
|
|
- if header_search_context[:group] || header_search_context[:project]
|
|
|
|
= hidden_field_tag :scope, header_search_context[:scope]
|
|
|
|
= hidden_field_tag :search_code, header_search_context[:code_search]
|
|
|
|
|
|
|
|
= hidden_field_tag :snippets, header_search_context[:for_snippets]
|
|
|
|
= hidden_field_tag :repository_ref, header_search_context[:ref]
|
|
|
|
= hidden_field_tag :nav_source, 'navbar'
|
|
|
|
|
|
|
|
-# workaround for non-JS feature specs, see spec/support/helpers/search_helpers.rb
|
|
|
|
- if ENV['RAILS_ENV'] == 'test'
|
|
|
|
%noscript= button_tag 'Search'
|
2022-07-06 05:08:10 -04:00
|
|
|
%kbd.gl-absolute.gl-right-3.gl-top-0.keyboard-shortcut-helper.gl-z-index-1.has-tooltip{ data: { html: 'true',
|
|
|
|
placement: 'bottom' },
|
|
|
|
title: html_escape(s_('GlobalSearch|Use the shortcut key %{kbdOpen}/%{kbdClose} to start a search')) % { kbdOpen: '<kbd>'.html_safe, kbdClose: '</kbd>'.html_safe } }
|
|
|
|
= '/'
|