项目资源提供新分页
This commit is contained in:
parent
580e4d7327
commit
64889fd14a
|
@ -230,6 +230,7 @@ class FilesController < ApplicationController
|
||||||
@order = ""
|
@order = ""
|
||||||
@is_remote = false
|
@is_remote = false
|
||||||
if params[:project_id]
|
if params[:project_id]
|
||||||
|
@page = params[:page] ? params[:page].to_i + 1 : 2
|
||||||
@container_type = 0
|
@container_type = 0
|
||||||
if params[:sort]
|
if params[:sort]
|
||||||
params[:sort].split(",").each do |sort_type|
|
params[:sort].split(",").each do |sort_type|
|
||||||
|
|
|
@ -123,7 +123,7 @@
|
||||||
<div class="cl"></div>
|
<div class="cl"></div>
|
||||||
</div>
|
</div>
|
||||||
<div id="course_list">
|
<div id="course_list">
|
||||||
<%= 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} %>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<% html_title(l(:label_attachment_plural)) -%>
|
<% html_title(l(:label_attachment_plural)) -%>
|
|
@ -45,8 +45,17 @@
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
||||||
<ul class="wlist">
|
<% if project_attachments.count == 10%>
|
||||||
<%= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => @is_remote, :flag => true%>
|
<% if params[:action] == 'search_project' %>
|
||||||
</ul>
|
<!--<ul class="wlist">-->
|
||||||
|
<!--<%#= pagination_links_full @obj_pages, @obj_count, :per_page_links => false, :remote => @is_remote, :flag => true%>-->
|
||||||
|
<!--</ul>-->
|
||||||
|
<%=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%>
|
||||||
|
<!-- 全站搜索的时候 返回的页码对象是obj_pages,而站内搜索返回的页码对象是feedback_pages -->
|
||||||
|
<%=link_to "点击展开更多", project_files_path(:project_id => project.id,:page => @page),:id => "show_more_attachments",:remote => "true",:class => "loadMore mt10 f_grey" %>
|
||||||
|
<%end%>
|
||||||
|
<% end%>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue