项目资源库更新资源公开私有属性的时候 需要区分 项目课程

This commit is contained in:
lizanle 2015-12-31 17:06:49 +08:00
parent a82fef3ea2
commit b06bd51347
1 changed files with 5 additions and 0 deletions

View File

@ -1,5 +1,10 @@
<% if @attachment.container_type == 'Course' %>
$("#is_public_<%= @attachment.id %>").html("<%= escape_javascript(link_to (@attachment.is_public? ? "设为私有":"设为公开"), update_file_dense_attachments_path(:attachmentid=>@attachment.id,:newtype=>(@attachment.is_public? ? 0:1)),
:remote=>true,:class=>"postOptionLink",:method => :post) %>");
<%else%>
$("#is_public_<%= @attachment.id %>").html("<%= escape_javascript(link_to (@attachment.is_public? ? "公开":"私有"), update_file_dense_attachments_path(:attachmentid=>@attachment.id,:newtype=>(@attachment.is_public? ? 0:1)),
:remote=>true,:class=>"f_l re_open",:method => :post) %>");
<%end %>
<%if @attachment.is_public? %>
$("#image_private_<%= @attachment.id%>").html('')
<%else%>