2016-01-13 15:17:13 +08:00
|
|
|
|
<% if params[:user_page].nil? %>
|
2016-07-22 18:20:11 +08:00
|
|
|
|
$("#project_info_<%=@course.id %>").html('<%=escape_javascript(render :partial=>'layouts/course_base_info') %>');
|
2016-01-13 15:17:13 +08:00
|
|
|
|
if(document.getElementById("course_is_public")) {
|
|
|
|
|
<% if @course.is_public == 0%>
|
|
|
|
|
$("#course_is_public").attr("checked",false);
|
|
|
|
|
<% elsif @course.is_public == 1 %>
|
|
|
|
|
$("#course_is_public").attr("checked",true);
|
|
|
|
|
<% end %>
|
|
|
|
|
}
|
|
|
|
|
<% else %>
|
2016-01-13 16:59:48 +08:00
|
|
|
|
<% if @course.is_public? %>
|
2016-07-01 21:38:37 +08:00
|
|
|
|
$("#show_course_<%= @course.id %>").attr("title","公开班级:<%= @course.name %>(<%= @course.time.to_s+ @course.term %>)");
|
2016-01-13 16:59:48 +08:00
|
|
|
|
<% else %>
|
2016-07-01 21:38:37 +08:00
|
|
|
|
$("#show_course_<%= @course.id %>").attr("title","私有班级:<%= @course.name %>(<%= @course.time.to_s+ @course.term %>)");
|
2016-01-13 16:59:48 +08:00
|
|
|
|
<% end %>
|
2016-03-09 10:25:57 +08:00
|
|
|
|
$("#set_course_public_<%= @course.id %>").replaceWith('<%= escape_javascript(link_to @course.is_public == 0 ? "设为公开" : "设为私有", {:controller => "courses", :action => "private_or_public", :id => @course,:user_page => true},
|
|
|
|
|
:id => "set_course_public_#{@course.id.to_s}",:remote=>true,:confirm=>"您确定要设置为"+(@course.is_public == 0 ? "公开" : "私有")+"吗") %>');
|
2016-01-13 15:17:13 +08:00
|
|
|
|
<% end %>
|