点击展开更多

This commit is contained in:
lizanle 2015-12-31 11:12:00 +08:00
parent be146a9421
commit 20a03b2386
1 changed files with 8 additions and 8 deletions

View File

@ -39,9 +39,10 @@
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<% if User.current.logged? %>
<li><%= link_to("发&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;送".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 (delete_allowed || User.current.id == file.author_id) && file.container_id == @course.id && file.container_type == "Course" %>
<li><%= link_to("发&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;送".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>
<% if @course.is_public? %>
<li>
@ -56,7 +57,10 @@
</li>
<% end %>
<%else %>
<li><%= link_to("发&nbsp;&nbsp;送".html_safe, 'javascript:void(0)',:class => "postOptionLink",:onclick=>"show_send('#{file.id}')") %></li>
<% end %>
<% end %>
</ul>
</li>
@ -75,14 +79,10 @@
<% if curse_attachments.count == 10%>
<% 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%>
<!-- 全站搜索的时候 返回的页码对象是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%>
<script type="text/javascript">
$("#show_more_attachments").mouseover(function(){
$("#more_attachments_link").click();
});
</script>