隐藏课程的关闭/开启按钮

This commit is contained in:
ouyangxuhua 2015-10-29 16:48:54 +08:00
parent 1963434242
commit 16206d8c0a
1 changed files with 4 additions and 4 deletions

View File

@ -628,10 +628,10 @@ module CoursesHelper
#重启、关闭课程按钮
def set_course_time course
id = "finish_course_#{course.id}"
linkPath = course_endTime_timeout?(course) ? restartcourse_course_path(course) : finishcourse_course_path(course, format: :js)
desc = course_endTime_timeout?(course) ? l(:label_course_reload) : l(:label_course_closed)
link_to "<span class='pr_close'></span>#{desc}".html_safe, linkPath, :remote => true, :method => :post, :id => id, :confirm => l(:label_course_closed_tips, :desc => desc), :class => "pr_join_a"
# id = "finish_course_#{course.id}"
# linkPath = course_endTime_timeout?(course) ? restartcourse_course_path(course) : finishcourse_course_path(course, format: :js)
# desc = course_endTime_timeout?(course) ? l(:label_course_reload) : l(:label_course_closed)
# link_to "<span class='pr_close'></span>#{desc}".html_safe, linkPath, :remote => true, :method => :post, :id => id, :confirm => l(:label_course_closed_tips, :desc => desc), :class => "pr_join_a"
end
#加入课程、退出课程按钮