私有课程的资源不允许设置为公开

This commit is contained in:
lizanle 2015-12-28 17:26:29 +08:00
parent e35d2daa0a
commit 6440434428
1 changed files with 4 additions and 6 deletions

View File

@ -40,7 +40,6 @@
<li class="homepagePostSettingIcon">
<ul class="homepagePostSettiongText">
<% if (delete_allowed || User.current.id == file.author_id) && file.container_id == @course.id && file.container_type == "Course" %>
<% if @course.is_public? %>
<li>
@ -49,17 +48,16 @@
</span>
</li>
<%else%>
<li>
<span id="is_public_<%= file.id %>">
<%= link_to (file.is_public? ? "设为私有":"设为公开"), update_file_dense_attachments_path(:attachmentid=>file.id,:newtype=>(file.is_public? ? 0:1)),:remote=>true,:class=>"postOptionLink",:method => :post %>
</span>
</li>
<%end%>
<li>
<%= link_to( '删除资源', attachment_path(file),
:data => {:confirm => l(:text_are_you_sure)}, :method => :delete,:class => "postOptionLink") if (delete_allowed || User.current.id == file.author_id) && file.container_id == @course.id && file.container_type == "Course"%>
</li>
<!--<%# if has_course?(User.current,file) %>-->
<!--<li><%#= link_to("发 送",quote_resource_show_course_file_path(@course,file),:class => "postOptionLink",:remote => true) %></li>-->
<!--<%#end %>-->
<% end %>
</ul>
</li>