|
|
|
@ -17,24 +17,40 @@
|
|
|
|
|
</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
<% type = type%>
|
|
|
|
|
$(document).ready(function (){
|
|
|
|
|
if('<%= type %>' != null && '<%= type %>' == 'courses' ){
|
|
|
|
|
$('input:radio[value="courses"]').attr('checked','checked');
|
|
|
|
|
}
|
|
|
|
|
if('<%= type %>' != null && '<%= type %>' == 'projects' ){
|
|
|
|
|
$('input:radio[value="projects"]').attr('checked','checked');
|
|
|
|
|
}
|
|
|
|
|
if('<%= type %>' != null && '<%= type %>' == 'users' ){
|
|
|
|
|
$('input:radio[value="users"]').attr('checked','checked');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
<div class="fl" id="navHomepageSearch">
|
|
|
|
|
<form class="navHomepageSearchBox">
|
|
|
|
|
<input type="text" name="navHomepageSearch" class="navHomepageSearchInput" />
|
|
|
|
|
<a href="javascript:void(0);" class="homepageSearchIcon"></a>
|
|
|
|
|
</form>
|
|
|
|
|
<!--<form class="navHomepageSearchBox">-->
|
|
|
|
|
<% name = name%>
|
|
|
|
|
|
|
|
|
|
<%= form_tag({controller: :welcome, action: :search },:class=>'navHomepageSearchBox', method: :get) do %>
|
|
|
|
|
<input type="text" name="q" value="<%= name.nil? ? "" : name%>" class="navHomepageSearchInput" />
|
|
|
|
|
<input type="hidden" name="search_type" id="type" value=""/>
|
|
|
|
|
<a href="javascript:void(0);" class="homepageSearchIcon" onclick="$('#type').val($('input[type=radio]:checked').val());$(this).parent().submit();"></a>
|
|
|
|
|
<% end %>
|
|
|
|
|
<div class="navSearchTypeBox" id="navHomepageSearchType">
|
|
|
|
|
<div class="fl mr15 mt8">
|
|
|
|
|
<input type="radio" value="课程" name="navSearchType" checked/>
|
|
|
|
|
<input type="radio" value="courses" name="search_type" checked/>
|
|
|
|
|
课程
|
|
|
|
|
</div>
|
|
|
|
|
<div class="fl mr15 mt8">
|
|
|
|
|
<input type="radio" value="项目" name="navSearchType" />
|
|
|
|
|
<input type="radio" value="projects" name="search_type" />
|
|
|
|
|
项目
|
|
|
|
|
</div>
|
|
|
|
|
<div class="fl mr15 mt8">
|
|
|
|
|
<input type="radio" value="用户" name="navSearchType" />
|
|
|
|
|
<input type="radio" value="users" name="search_type" />
|
|
|
|
|
用户
|
|
|
|
|
</div>
|
|
|
|
|
<div id="navSearchAlert" class="fr mr10">
|
|
|
|
|