%
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:'请输入要搜索的关键字', style:"float:left" %>
<%= select_tag(:search_type, options_for_select(select_option), :onchange => "searchTypeChange();", :style => "float:right" ) %>
<%= select_tag(:search_by,options_for_select([["昵称","0"],["姓名","1"],["邮箱","2"]]), :onchange => "searchByChange();",:style => "float:right" ) %>
<%#= hidden_field_tag 'project_type', project_type %>
<%= submit_tag l(:label_search), :class => "enterprise", :name => nil,:style =>"float: right; margin-left:3px;margin-top:2px" %>
<% end %>