题库的搜索调整
This commit is contained in:
parent
acc3ba121f
commit
bae775ec34
|
@ -1,4 +1,8 @@
|
||||||
<% homeworks.each do |homework| %>
|
<% if homeworks.empty? %>
|
||||||
|
<div class="icons_tishi"><img src="../images/sy/icons_tan.png" width="110" height="110" alt="" ></div>
|
||||||
|
<p class="sy_tab_con_p">暂无可显示的内容~</p>
|
||||||
|
<% else %>
|
||||||
|
<% homeworks.each do |homework| %>
|
||||||
<ul class="sy_classlist">
|
<ul class="sy_classlist">
|
||||||
<span class="hw_icons_cir fl mt5 mr5"></span>
|
<span class="hw_icons_cir fl mt5 mr5"></span>
|
||||||
<div class="fl ">
|
<div class="fl ">
|
||||||
|
@ -50,4 +54,5 @@
|
||||||
<a href="javascript:void(0);" class="hw_btn_green fr mt5 mr5" onclick="show_homework_detail('<%=show_homework_detail_user_path(@user,:homework=>homework.id,:is_import => 0) %>')" data-remote="true">预览</a>
|
<a href="javascript:void(0);" class="hw_btn_green fr mt5 mr5" onclick="show_homework_detail('<%=show_homework_detail_user_path(@user,:homework=>homework.id,:is_import => 0) %>')" data-remote="true">预览</a>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</ul>
|
</ul>
|
||||||
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
|
@ -1,16 +1,6 @@
|
||||||
<span class="sy_cgrey ">排序:</span>
|
<div id="homework_repository_sort">
|
||||||
<%= link_to "发布时间",user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "publish_time", :sort => @r_sort),:class => "sy_cgrey fl",:remote => true%>
|
<%= render :partial => 'users/homework_repository_sort', :locals => {:type => type,:is_import => is_import,:property => property,:order => @order,:search => search} %>
|
||||||
<% if order == "publish_time" %>
|
</div>
|
||||||
<%= link_to "", user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "publish_time", :sort => @r_sort), :class => "#{@r_sort == 'asc' ? 'sortupbtn' : 'sortdownbtn'} mt15 fl", :remote => true %>
|
|
||||||
<% else %>
|
|
||||||
<%= link_to "", user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "publish_time", :sort => @r_sort), :class => "sortdownbtn sort_no mt15 fl", :remote => true %>
|
|
||||||
<% end %>
|
|
||||||
<%= link_to "引用数",user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "quotes", :sort => @r_sort),:class => "sy_cgrey fl",:remote => true%>
|
|
||||||
<% if order == "quotes" %>
|
|
||||||
<%= link_to "", user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "quotes", :sort => @r_sort), :class => "#{@r_sort == 'asc' ? 'sortupbtn' : 'sortdownbtn'} mt15 fl", :remote => true %>
|
|
||||||
<% else %>
|
|
||||||
<%= link_to "", user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "quotes", :sort => @r_sort), :class => "sortdownbtn sort_no mt15 fl", :remote => true %>
|
|
||||||
<% end %>
|
|
||||||
|
|
||||||
<div class="hw_search_box fr mr10">
|
<div class="hw_search_box fr mr10">
|
||||||
<input class="hw_search-input" name="search" value='<%=search %>' placeholder="输入作业、老师姓名的关键词进行搜索" type="text" >
|
<input class="hw_search-input" name="search" value='<%=search %>' placeholder="输入作业、老师姓名的关键词进行搜索" type="text" >
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
<span class="sy_cgrey ">排序:</span>
|
||||||
|
<%= link_to "发布时间",user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "publish_time", :sort => @r_sort),:class => "sy_cgrey fl",:remote => true%>
|
||||||
|
<% if order == "publish_time" %>
|
||||||
|
<%= link_to "", user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "publish_time", :sort => @r_sort), :class => "#{@r_sort == 'asc' ? 'sortupbtn' : 'sortdownbtn'} mt15 fl", :remote => true %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to "", user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "publish_time", :sort => @r_sort), :class => "sortdownbtn sort_no mt15 fl", :remote => true %>
|
||||||
|
<% end %>
|
||||||
|
<%= link_to "引用数",user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "quotes", :sort => @r_sort),:class => "sy_cgrey fl",:remote => true%>
|
||||||
|
<% if order == "quotes" %>
|
||||||
|
<%= link_to "", user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "quotes", :sort => @r_sort), :class => "#{@r_sort == 'asc' ? 'sortupbtn' : 'sortdownbtn'} mt15 fl", :remote => true %>
|
||||||
|
<% else %>
|
||||||
|
<%= link_to "", user_search_homeworks_user_path(@user,:name=>search,:type => type,:is_import=>is_import,:property=>property,:order => "quotes", :sort => @r_sort), :class => "sortdownbtn sort_no mt15 fl", :remote => true %>
|
||||||
|
<% end %>
|
|
@ -48,24 +48,19 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<div id="hw_tab_con_1">
|
<div id="hw_tab_con_1">
|
||||||
<% if @homeworks.empty? %>
|
<div class="sy_category" id="homework_search_input">
|
||||||
<div class="icons_tishi"><img src="../images/sy/icons_tan.png" width="110" height="110" alt="" ></div>
|
<%=render :partial=>'homework_repository_search', :locals=>{:type => '1',:is_import => 0,:property => nil,:order => @order, :search => ''} %>
|
||||||
<p class="sy_tab_con_p">暂无可显示的内容~</p>
|
</div>
|
||||||
<% else %>
|
|
||||||
<div class="sy_category" id="homework_search_input">
|
|
||||||
<%=render :partial=>'homework_repository_search', :locals=>{:type => '1',:is_import => 0,:property => nil,:order => @order, :b_sort => @b_sort, :search => ''} %>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="sy_classbox" style="min-height:800px;" id="homework_repository_list">
|
<div class="sy_classbox" style="min-height:800px;" id="homework_repository_list">
|
||||||
<%=render :partial => 'homework_repository_list', :locals => {:homeworks => @homeworks,:type=>'1',:is_import => 0,:property => @property,:search=>''} %>
|
<%=render :partial => 'homework_repository_list', :locals => {:homeworks => @homeworks,:type=>'1',:is_import => 0,:property => @property,:search=>''} %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pages">
|
<div class="pages">
|
||||||
<ul id="homework_pository_ref_pages">
|
<ul id="homework_pository_ref_pages">
|
||||||
<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true%>
|
<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true%>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
<% end %>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -5,5 +5,5 @@ $("#homework_detail_information").html("<%=escape_javascript(render :partial =>
|
||||||
<% else %>
|
<% else %>
|
||||||
$("#homework_repository_list").html('<%= escape_javascript(render :partial => 'users/homework_repository_list', :locals => {:homeworks => @homeworks,:sort => @order,:b_sort => @b_sort,:type=>@type,:is_import => @is_import,:property => @property,:search=>@search})%>');
|
$("#homework_repository_list").html('<%= escape_javascript(render :partial => 'users/homework_repository_list', :locals => {:homeworks => @homeworks,:sort => @order,:b_sort => @b_sort,:type=>@type,:is_import => @is_import,:property => @property,:search=>@search})%>');
|
||||||
$("#homework_pository_ref_pages").html('<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>');
|
$("#homework_pository_ref_pages").html('<%= pagination_links_full @hw_pages, @hw_count, :per_page_links => false, :remote => @is_remote, :flag => true, :is_new => true %>');
|
||||||
$("#homework_search_input").html('<%= escape_javascript(render :partial => 'users/homework_repository_search', :locals => {:type => @type,:is_import => @is_import,:property => @property,:order => @order, :b_sort => @b_sort, :search => @search})%>');
|
$("#homework_repository_sort").html('<%= escape_javascript(render :partial => 'users/homework_repository_sort', :locals => {:type => @type,:is_import => @is_import,:property => @property,:order => @order, :search => @search})%>');
|
||||||
<% end %>
|
<% end %>
|
Loading…
Reference in New Issue