2015-12-31 17:06:49 +08:00
|
|
|
<% if @attachment.container_type == 'Course' %>
|
2015-12-28 16:19:30 +08:00
|
|
|
$("#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) %>");
|
2016-01-06 15:58:22 +08:00
|
|
|
<% elsif @attachment.container_type == 'Project' %>
|
|
|
|
$("#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 %>
|
2016-01-14 17:52:48 +08:00
|
|
|
$("#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) %>");
|
2016-01-06 15:58:22 +08:00
|
|
|
<% end %>
|
|
|
|
<% if @attachment.is_public? %>
|
2015-12-28 16:19:30 +08:00
|
|
|
$("#image_private_<%= @attachment.id%>").html('')
|
|
|
|
<%else%>
|
|
|
|
$("#image_private_<%= @attachment.id%>").html('<span class="img_private ml5">私有</span>')
|
2016-01-06 15:58:22 +08:00
|
|
|
<% end %>
|