2016-03-09 00:39:14 +00:00
|
|
|
.search.search-form
|
|
|
|
= form_tag search_path, method: :get, class: 'navbar-form' do |f|
|
|
|
|
.search-input-container
|
|
|
|
.search-location-badge
|
|
|
|
= render 'shared/location_badge'
|
|
|
|
.search-input-wrap
|
|
|
|
= search_field_tag "search", nil, placeholder: 'Search', class: "search-input", spellcheck: false, tabindex: "1", autocomplete: 'off'
|
2014-12-02 20:38:45 +00:00
|
|
|
|
2016-03-09 00:39:14 +00:00
|
|
|
= hidden_field_tag :group_id, @group.try(:id)
|
2016-03-09 17:45:43 +00:00
|
|
|
= hidden_field_tag :project_id, @project && @project.persisted? ? @project.id : '', id: 'search_project_id'
|
2016-03-08 07:56:43 +00:00
|
|
|
|
|
|
|
- if @project && @project.persisted?
|
2014-12-02 20:38:45 +00:00
|
|
|
- if current_controller?(:issues)
|
|
|
|
= hidden_field_tag :scope, 'issues'
|
|
|
|
- elsif current_controller?(:merge_requests)
|
|
|
|
= hidden_field_tag :scope, 'merge_requests'
|
|
|
|
- elsif current_controller?(:wikis)
|
|
|
|
= hidden_field_tag :scope, 'wiki_blobs'
|
2015-06-14 22:04:20 +00:00
|
|
|
- elsif current_controller?(:commits)
|
|
|
|
= hidden_field_tag :scope, 'commits'
|
2014-12-02 20:38:45 +00:00
|
|
|
- else
|
|
|
|
= hidden_field_tag :search_code, true
|
|
|
|
|
2014-08-29 19:22:45 +00:00
|
|
|
- if @snippet || @snippets
|
|
|
|
= hidden_field_tag :snippets, true
|
2013-05-09 08:27:14 +00:00
|
|
|
= hidden_field_tag :repository_ref, @ref
|
2014-09-26 14:57:36 +00:00
|
|
|
= button_tag 'Go' if ENV['RAILS_ENV'] == 'test'
|
2014-01-18 12:16:46 +00:00
|
|
|
.search-autocomplete-opts.hide{:'data-autocomplete-path' => search_autocomplete_path, :'data-autocomplete-project-id' => @project.try(:id), :'data-autocomplete-project-ref' => @ref }
|