From b06bd513474f0869713c8138b2f810303ee80c7d Mon Sep 17 00:00:00 2001 From: lizanle <491823689@qq.com> Date: Thu, 31 Dec 2015 17:06:49 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B9=E7=9B=AE=E8=B5=84=E6=BA=90=E5=BA=93?= =?UTF-8?q?=E6=9B=B4=E6=96=B0=E8=B5=84=E6=BA=90=E5=85=AC=E5=BC=80=E7=A7=81?= =?UTF-8?q?=E6=9C=89=E5=B1=9E=E6=80=A7=E7=9A=84=E6=97=B6=E5=80=99=20?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E5=8C=BA=E5=88=86=20=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E8=AF=BE=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/attachments/update_file_dense.js.erb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/views/attachments/update_file_dense.js.erb b/app/views/attachments/update_file_dense.js.erb index 110d3fc7c..747024dec 100644 --- a/app/views/attachments/update_file_dense.js.erb +++ b/app/views/attachments/update_file_dense.js.erb @@ -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%>