解决课程资源重复分页问题

This commit is contained in:
huang 2016-01-08 18:09:11 +08:00
parent 0ab500986a
commit 762ebb150b
2 changed files with 2 additions and 2 deletions

View File

@ -280,7 +280,7 @@ class FilesController < ApplicationController
render :layout => 'base_projects'
elsif params[:course_id]
@container_type = 1
@page = params[:page] ? params[:page].to_i + 2 : 0
@page = params[:page] ? params[:page].to_i + 1 : 2
if params[:sort]
params[:sort].split(",").each do |sort_type|
order_by = sort_type.split(":")

View File

@ -123,7 +123,7 @@
<div class="cl"></div>
</div>
<div id="course_list">
<%= render :partial => 'course_list',:locals => {course: @course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@obj_attachments, :page=>1} %>
<%= render :partial => 'course_list',:locals => {course: @course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@obj_attachments, :page=>2} %>
</div>
</div>
<% html_title(l(:label_attachment_plural)) -%>