2015-05-20 11:56:34 +08:00
|
|
|
<% curse_attachments.each do |file| %>
|
2015-07-01 10:30:26 +08:00
|
|
|
<% if file.is_public? || User.current.member_of_course?(course) || User.current.admin? %>
|
2016-02-23 11:04:19 +08:00
|
|
|
<div id="resource_detail_<%=file.id %>">
|
|
|
|
<%=render :partial=>'files/resource_detail',:locals => {:file => file} %>
|
|
|
|
</div>
|
2015-05-20 11:56:34 +08:00
|
|
|
<% else %>
|
|
|
|
<div class="re_con_box"><span class='fr mr10 pr_join_span '><%= file.filename %>是私有资源</span></div>
|
|
|
|
<% end %>
|
2015-04-03 11:30:48 +08:00
|
|
|
<% end %>
|
2015-12-27 23:24:21 +08:00
|
|
|
|
2015-12-28 16:19:30 +08:00
|
|
|
<% if curse_attachments.count == 10%>
|
|
|
|
<% if params[:action] == 'search' %>
|
2015-12-31 11:12:00 +08:00
|
|
|
<%=link_to "点击展开更多", search_course_files_path({:course_id => course.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" %>
|
2016-01-08 18:03:59 +08:00
|
|
|
<% else %>
|
2015-12-28 16:19:30 +08:00
|
|
|
<!-- 全站搜索的时候 返回的页码对象是obj_pages,而站内搜索返回的页码对象是feedback_pages -->
|
2016-01-08 18:03:59 +08:00
|
|
|
<%=link_to "点击展开更多", course_files_path(:course_id => course.id, :page => @page), :id => "show_more_attachments",:remote => "true",:class => "loadMore mt10 f_grey" %>
|
2015-12-28 16:19:30 +08:00
|
|
|
<%end%>
|
|
|
|
<% end%>
|
2015-12-31 11:12:00 +08:00
|
|
|
|