From 864d969c155393c7a5410e18fde98531911e9f99 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 13 Oct 2014 14:52:07 +0800 Subject: [PATCH] =?UTF-8?q?#1173=20=E9=87=8D=E5=90=AF=E8=AF=BE=E7=A8=8B?= =?UTF-8?q?=E3=80=81=E5=85=B3=E9=97=AD=E8=AF=BE=E7=A8=8B=E3=80=81=E5=8A=A0?= =?UTF-8?q?=E5=85=A5=E8=AF=BE=E7=A8=8B=E3=80=81=E9=80=80=E5=87=BA=E8=AF=BE?= =?UTF-8?q?=E7=A8=8B=E7=AD=89=E6=8C=89=E9=92=AE=E9=A1=B5=E9=9D=A2=E7=9A=84?= =?UTF-8?q?=E5=88=B7=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/courses_controller.rb | 1 - app/views/courses/finishcourse.js.erb | 14 +++--- app/views/layouts/_base_header.html.erb | 43 +++++-------------- app/views/layouts/_user_courses_list.html.erb | 14 ++++++ app/views/layouts/_user_project_list.html.erb | 12 ++++++ 5 files changed, 43 insertions(+), 41 deletions(-) create mode 100644 app/views/layouts/_user_courses_list.html.erb create mode 100644 app/views/layouts/_user_project_list.html.erb diff --git a/app/controllers/courses_controller.rb b/app/controllers/courses_controller.rb index 945b8c514..a9a02045f 100644 --- a/app/controllers/courses_controller.rb +++ b/app/controllers/courses_controller.rb @@ -544,7 +544,6 @@ class CoursesController < ApplicationController def finishcourse yesterday = Date.today.prev_day.to_time - @course_prefs.endup_time = yesterday @save_flag = @course_prefs.save get_courses diff --git a/app/views/courses/finishcourse.js.erb b/app/views/courses/finishcourse.js.erb index 75c2b774d..46bc57e32 100644 --- a/app/views/courses/finishcourse.js.erb +++ b/app/views/courses/finishcourse.js.erb @@ -1,12 +1,12 @@ <% 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} )%>") + <% 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} )%>"); <% else %> -alert('权限不足,设置失败,请在论坛提交问题,等待管理员处理。'); + alert('权限不足,设置失败,请在论坛提交问题,等待管理员处理。'); <% end %> diff --git a/app/views/layouts/_base_header.html.erb b/app/views/layouts/_base_header.html.erb index b0daf8c88..c3b06759c 100644 --- a/app/views/layouts/_base_header.html.erb +++ b/app/views/layouts/_base_header.html.erb @@ -42,48 +42,25 @@
@@ -98,7 +75,7 @@