2012-10-11 23:41:49 +02:00
|
|
|
.search
|
2012-11-20 22:05:15 +01:00
|
|
|
= form_tag search_path, method: :get, class: 'navbar-form pull-left' do |f|
|
2012-10-11 23:41:49 +02:00
|
|
|
= text_field_tag "search", nil, placeholder: "Search", class: "search-input"
|
2013-01-25 09:07:21 +01:00
|
|
|
= hidden_field_tag :group_id, @group.try(:id)
|
|
|
|
= hidden_field_tag :project_id, @project.try(:id)
|
2012-10-11 23:41:49 +02:00
|
|
|
|
|
|
|
:javascript
|
|
|
|
$(function(){
|
|
|
|
$("#search").autocomplete({
|
|
|
|
source: #{raw search_autocomplete_source},
|
|
|
|
select: function(event, ui) { location.href = ui.item.url }
|
|
|
|
});
|
|
|
|
});
|