作品列表取消分页显示

This commit is contained in:
sw 2015-04-21 20:44:27 +08:00
parent 9fa3d25e3f
commit 57193b077e
4 changed files with 18 additions and 12 deletions

View File

@ -506,7 +506,8 @@ class BidsController < ApplicationController
end end
@cur_page = params[:page] || 1 @cur_page = params[:page] || 1
@homework_list = paginateHelper all_homework_list,10 # @homework_list = paginateHelper all_homework_list,10
@homework_list = all_homework_list
@jours_count = @bid.journals_for_messages.where('m_parent_id IS NULL').count @jours_count = @bid.journals_for_messages.where('m_parent_id IS NULL').count
if params[:student_id].present? if params[:student_id].present?
@temp = [] @temp = []

View File

@ -59,7 +59,8 @@ class HomeworkAttachController < ApplicationController
all_homework_list = search_homework_member(all_homework_list,@search_name.to_s.downcase) if @search_name all_homework_list = search_homework_member(all_homework_list,@search_name.to_s.downcase) if @search_name
@cur_page = params[:page] || 1 @cur_page = params[:page] || 1
@cur_type = 2 @cur_type = 2
@homework_list = paginateHelper all_homework_list,10 # @homework_list = paginateHelper all_homework_list,10
@homework_list = all_homework_list
@direction = direction == 'asc'? 'desc' : 'asc' @direction = direction == 'asc'? 'desc' : 'asc'
respond_to do |format| respond_to do |format|
format.js format.js
@ -93,7 +94,8 @@ class HomeworkAttachController < ApplicationController
all_homework_list = search_homework_member(all_homework_list,@search_name.to_s.downcase) if @search_name all_homework_list = search_homework_member(all_homework_list,@search_name.to_s.downcase) if @search_name
@cur_page = params[:page] || 1 @cur_page = params[:page] || 1
@cur_type = 3 @cur_type = 3
@homework_list = paginateHelper all_homework_list,10 # @homework_list = paginateHelper all_homework_list,10
@homework_list = all_homework_list
@direction = direction == 'asc'? 'desc' : 'asc' @direction = direction == 'asc'? 'desc' : 'asc'
respond_to do |format| respond_to do |format|
format.js format.js
@ -110,7 +112,8 @@ class HomeworkAttachController < ApplicationController
all_homework_list = get_student_batch_homework_list @bid,User.current all_homework_list = get_student_batch_homework_list @bid,User.current
@cur_page = params[:page] || 1 @cur_page = params[:page] || 1
@cur_type = 4 @cur_type = 4
@homework_list = paginateHelper all_homework_list,10 # @homework_list = paginateHelper all_homework_list,10
@homework_list = all_homework_list
respond_to do |format| respond_to do |format|
format.js format.js
end end
@ -134,7 +137,8 @@ class HomeworkAttachController < ApplicationController
WHERE homework_attaches.bid_id = #{@bid.id} AND homework_users.user_id = #{User.current.id}") WHERE homework_attaches.bid_id = #{@bid.id} AND homework_users.user_id = #{User.current.id}")
end end
@cur_page = params[:page] || 1 @cur_page = params[:page] || 1
@homework_list = paginateHelper all_homework_list,10 # @homework_list = paginateHelper all_homework_list,10
@homework_list = all_homework_list
respond_to do |format| respond_to do |format|
format.js format.js
end end
@ -612,7 +616,8 @@ class HomeworkAttachController < ApplicationController
ORDER BY #{order_by}) AS table1 ORDER BY #{order_by}) AS table1
WHERE table1.t_score IS NULL OR table1.t_score = 0 ") WHERE table1.t_score IS NULL OR table1.t_score = 0 ")
@all_homework_list = search_homework_member(@all_homework_list,@search_name.to_s.downcase) if @search_name @all_homework_list = search_homework_member(@all_homework_list,@search_name.to_s.downcase) if @search_name
@homework_list = paginateHelper @all_homework_list,10 # @homework_list = paginateHelper @all_homework_list,10
@homework_list = @all_homework_list
end end
#获取指定作业的所有成员 #获取指定作业的所有成员

View File

@ -66,11 +66,11 @@
<% else %> <% else %>
<% end %> <% end %>
<!-- 如果是我的作业或者匿评列表界面不现实分页控件 --> <!-- 如果是我的作业或者匿评列表界面不现实分页控件 -->
<% unless is_my_homework || is_student_batch_homework %> <%# unless is_my_homework || is_student_batch_homework %>
<ul class="wlist"> <!--<ul class="wlist">-->
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => remote, :flag => true%> <%#= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => remote, :flag => true%>
</ul> <!--</ul>-->
<% end %> <%# end %>
<% if is_teacher %> <% if is_teacher %>
<span style="color: red;"> <span style="color: red;">

View File

@ -11,7 +11,7 @@ a:hover{ text-decoration:underline;}
.container{ width:940px; margin:0 auto; } .container{ width:940px; margin:0 auto; }
/* 作业列表 */ /* 作业列表 */
.ttl{ } .ttl{ }
.ctt{height:820px;clear:both; } .ctt{clear:both; }
/* TAB 切换效果 */ /* TAB 切换效果 */
.tb_{ background-color: #eaeaea; height:40px; } .tb_{ background-color: #eaeaea; height:40px; }
.tb_ ul{height:40px; } .tb_ ul{height:40px; }