diff --git a/app/controllers/files_controller.rb b/app/controllers/files_controller.rb index c6773ef57..06ea15357 100644 --- a/app/controllers/files_controller.rb +++ b/app/controllers/files_controller.rb @@ -230,6 +230,7 @@ class FilesController < ApplicationController @order = "" @is_remote = false if params[:project_id] + @page = params[:page] ? params[:page].to_i + 1 : 2 @container_type = 0 if params[:sort] params[:sort].split(",").each do |sort_type| diff --git a/app/views/files/_course_file.html.erb b/app/views/files/_course_file.html.erb index 5a6ce69ce..9513baab0 100644 --- a/app/views/files/_course_file.html.erb +++ b/app/views/files/_course_file.html.erb @@ -123,7 +123,7 @@
- <%= render :partial => 'course_list',:locals => {course: @course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@obj_attachments, :page=>2} %> + <%= render :partial => 'course_list',:locals => {course: @course,all_attachments: @all_attachments,sort:@sort,order:@order,curse_attachments:@obj_attachments} %>
<% html_title(l(:label_attachment_plural)) -%> \ No newline at end of file diff --git a/app/views/files/_project_list.html.erb b/app/views/files/_project_list.html.erb index d84c1cada..0d4b0f35e 100644 --- a/app/views/files/_project_list.html.erb +++ b/app/views/files/_project_list.html.erb @@ -45,8 +45,17 @@ <% end %> <% end %> - +<% if project_attachments.count == 10%> + <% if params[:action] == 'search_project' %> + + + + <%=link_to "点击展开更多", search_project_project_files_path({:project_id => project.id, :page => @obj_pages.nil? ? @feedback_pages.page + 1 : @obj_pages.page + 1}.merge(params)),:id => "show_more_attachments",:remote => "true",:class => "loadMore mt10 f_grey" %> + <%else%> + + <%=link_to "点击展开更多", project_files_path(:project_id => project.id,:page => @page),:id => "show_more_attachments",:remote => "true",:class => "loadMore mt10 f_grey" %> + <%end%> +<% end%> +