%
select_option = []
(select_option << ['项目', 'projects']) if project_type == Project::ProjectType_project
(select_option << ['课程', 'courses']) if project_type == Project::ProjectType_course
select_option << ['用户', 'users']
%>
<%= form_tag({controller: :welcome, action: :search }, method: :get) do %>
<%= text_field_tag :q, nil, placeholder:'请输入要搜索的关键字', :size => 27 %>
<%= select_tag(:search_type, options_for_select(select_option), :onchange => "searchTypeChange();" ) %>
<%= select_tag(:search_by,options_for_select([["昵称","0"],["姓名","1"],["邮箱","2"]]), :onchange => "searchByChange();" ) %>
<%#= hidden_field_tag 'project_type', project_type %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
<% end %>