解决课程资源重复分页问题
This commit is contained in:
parent
0ab500986a
commit
762ebb150b
|
@ -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(":")
|
||||
|
|
|
@ -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)) -%>
|
Loading…
Reference in New Issue