关闭课程与重开课程js
This commit is contained in:
parent
0d04eb745f
commit
ed92faaedd
|
@ -498,6 +498,7 @@ class CoursesController < ApplicationController
|
|||
@issue_custom_fields = IssueCustomField.sorted.all
|
||||
@trackers = Tracker.sorted.all
|
||||
@course = Course.new
|
||||
@course.op
|
||||
@course.safe_attributes = params[:course]
|
||||
month = Time.now.month
|
||||
render :layout => 'new_base'
|
||||
|
|
|
@ -1,10 +1,6 @@
|
|||
<% if @save_flag %>
|
||||
<% if Rails.env.development? %>
|
||||
console.debug('课程修改成功:结束时间改为<%=Course.find_by_extra(@course.extra).try(:endup_time)%>');
|
||||
<% end %>
|
||||
$('#content-title-top-div').html("<%= j(render partial: 'users/my_course_ex', :locals => {:memberships => @memberships,:user=>@user,
|
||||
:memberships_doing=>@memberships_doing,:memberships_done=>@memberships_done} )%>");
|
||||
$('#finish_course_<%=@course.id%>').replaceWith("<%= j(render partial: 'courses/set_course_time', :locals => {:course => @course} )%>");
|
||||
$('#finish_course_<%=@course.id%>').replaceWith("<%= escape_javascript(set_course_time(@course_prefs))%>");
|
||||
// alert("关闭成功");
|
||||
<% else %>
|
||||
alert('权限不足,设置失败,请在论坛提交问题,等待管理员处理。');
|
||||
<% end %>
|
||||
|
|
Loading…
Reference in New Issue