socialforge/app/views/projects/set_public_or_private.js.erb

7 lines
687 B
Plaintext
Raw Normal View History

<% if @project.is_public? %>
2016-01-14 18:26:36 +08:00
$("#show_project_<%= @project.id %>").attr("title","公开项目:<%= @project.name %>");
<% else %>
2016-01-14 18:26:36 +08:00
$("#show_project_<%= @project.id %>").attr("title","私有项目:<%= @project.name %>");
<% end %>
$("#set_project_public_<%= @project.id %>").replaceWith('<%= escape_javascript(link_to @project.is_public? ? "设为私有" : "设为公开", {:controller => "projects", :action => "set_public_or_private", :id => @project.id,:user_page => true},
:id => "set_project_public_"+ @project.id.to_s,:method => "post",:remote=>true,:confirm=>"您确定要设置为"+(@project.is_public? ? "私有" : "公开")+"吗") %>');