项目、课程主页用户搜索后结果界面也支持按姓名、昵称、邮箱搜索

This commit is contained in:
sw 2014-12-30 11:09:47 +08:00
parent ee1df78f13
commit 933a84f51d
1 changed files with 8 additions and 4 deletions

View File

@ -8,6 +8,11 @@
} }
$("#search_user_form").submit(); $("#search_user_form").submit();
} }
function searchByChange()
{
$("#search_by_input").val($("#search_by").val());
}
</script> </script>
<div class="top-content"> <div class="top-content">
@ -25,10 +30,9 @@
<td rowspan="2" > <td rowspan="2" >
<div class="project-search" style="float: right"> <div class="project-search" style="float: right">
<!--label for="user_browse_label"><%#= l(:label_user_search_type) %></label--> <!--label for="user_browse_label"><%#= l(:label_user_search_type) %></label-->
<%#= select "search_by", "id", <%= select_tag(:search_by,options_for_select([["昵称","0"],["姓名","1"],["邮箱","2"]],@search_by), :onchange => "searchByChange();" ) %>
{ l(:label_search_by_login) => "0", l(:label_search_by_name) => "1", l(:label_search_by_email) => "2" }, <%= text_field_tag 'name', params[:name], :size => 30 %>
:size => 20 %> <input type="text" name="search_by_input" hidden="hidden;" id="search_by_input" value="0">
<%= text_field_tag 'name', params[:name], :size => 30 %>
<input type="button" class="enterprise" value="<%= l(:label_search) %>" onclick="searchUser();"/> <input type="button" class="enterprise" value="<%= l(:label_search) %>" onclick="searchUser();"/>
<%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %> <%#= submit_tag l(:label_search), :class => "enterprise", :name => nil %>
</div> </div>