|
|
@ -39,9 +39,10 @@
|
|
|
|
<li class="homepagePostSettingIcon">
|
|
|
|
<li class="homepagePostSettingIcon">
|
|
|
|
<ul class="homepagePostSettiongText">
|
|
|
|
<ul class="homepagePostSettiongText">
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
<% if User.current.logged? %>
|
|
|
|
<li><%= link_to("发 送".html_safe, 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{file.id}')") %></li>
|
|
|
|
|
|
|
|
<% if (is_course_teacher(User.current,@course) || file.author_id == User.current.id) && course_contains_attachment?(@course,file) %>
|
|
|
|
<% if (is_course_teacher(User.current,@course) || file.author_id == User.current.id) && course_contains_attachment?(@course,file) %>
|
|
|
|
<% if (delete_allowed || User.current.id == file.author_id) && file.container_id == @course.id && file.container_type == "Course" %>
|
|
|
|
<% if (delete_allowed || User.current.id == file.author_id) && file.container_id == @course.id && file.container_type == "Course" %>
|
|
|
|
|
|
|
|
<li><%= link_to("发 送".html_safe, 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{file.id}')") %></li>
|
|
|
|
<li><%= link_to '更新版本',attachments_versions_path(file),:class => "postOptionLink",:remote=>true %></li>
|
|
|
|
<li><%= link_to '更新版本',attachments_versions_path(file),:class => "postOptionLink",:remote=>true %></li>
|
|
|
|
<% if @course.is_public? %>
|
|
|
|
<% if @course.is_public? %>
|
|
|
|
<li>
|
|
|
|
<li>
|
|
|
@ -56,7 +57,10 @@
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
|
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
<%else %>
|
|
|
|
|
|
|
|
<li><%= link_to("发 送".html_safe, 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{file.id}')") %></li>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
</ul>
|
|
|
|
</ul>
|
|
|
|
</li>
|
|
|
|
</li>
|
|
|
@ -75,14 +79,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
<% if curse_attachments.count == 10%>
|
|
|
|
<% if curse_attachments.count == 10%>
|
|
|
|
<% if params[:action] == 'search' %>
|
|
|
|
<% if params[:action] == 'search' %>
|
|
|
|
<div id="show_more_attachments" class="loadMore mt10 f_grey">展开更多<%=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 => "more_attachments_link",:remote => "true",:class => "none" %></div>
|
|
|
|
<%=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" %>
|
|
|
|
<%else%>
|
|
|
|
<%else%>
|
|
|
|
<!-- 全站搜索的时候 返回的页码对象是obj_pages,而站内搜索返回的页码对象是feedback_pages -->
|
|
|
|
<!-- 全站搜索的时候 返回的页码对象是obj_pages,而站内搜索返回的页码对象是feedback_pages -->
|
|
|
|
<div id="show_more_attachments" class="loadMore mt10 f_grey">展开更多<%=link_to "", course_files_path({:course_id => course.id,:page => @obj_pages.nil? ? @feedback_pages.page + 1 : @obj_pages.page + 1}.merge(params)),:id => "more_attachments_link",:remote => "true",:class => "none" %></div>
|
|
|
|
<%=link_to "点击展开更多", 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" %>
|
|
|
|
<%end%>
|
|
|
|
<%end%>
|
|
|
|
<% end%>
|
|
|
|
<% end%>
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
|
|
$("#show_more_attachments").mouseover(function(){
|
|
|
|
|
|
|
|
$("#more_attachments_link").click();
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|