gitlab-org--gitlab-foss/app/views/layouts/_search.html.haml

15 lines
638 B
Plaintext
Raw Normal View History

2012-10-11 17:41:49 -04:00
.search
= form_tag search_path, method: :get, class: 'navbar-form pull-left' do |f|
2012-10-11 17:41:49 -04:00
= text_field_tag "search", nil, placeholder: "Search", class: "search-input"
2013-01-25 03:07:21 -05:00
= hidden_field_tag :group_id, @group.try(:id)
= hidden_field_tag :project_id, @project.try(:id)
2013-04-14 13:07:11 -04:00
- if @ref
- @branch_ref = @ref
- else
- @branch_ref = @project.try(:default_branch)
- if @branch_ref.blank?
- @branch_ref = 'master'
= hidden_field_tag :branch_ref, @branch_ref
- if ENV['RAILS_ENV'] == 'test'
= submit_tag 'Go'
.search-autocomplete-json.hide{:'data-autocomplete-opts' => search_autocomplete_source }