socialforge/app/views/courses/private_or_public.js.erb

18 lines
927 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<% if params[:user_page].nil? %>
$("#project_info_<%=@course.id %>").html('<%=escape_javascript(render :partial=>'layouts/project_info') %>');
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 %>
<% if @course.is_public? %>
$("#set_course_public_<%= @course.id %>").text("设为私有");
$("#show_course_<%= @course.id %>").attr("title","公开课程:<%= @course.name %><%= @course.time.to_s+ @course.term %>");
<% else %>
$("#set_course_public_<%= @course.id %>").text("设为公开");
$("#show_course_<%= @course.id %>").attr("title","私有课程:<%= @course.name %><%= @course.time.to_s+ @course.term %>");
<% end %>
<% end %>