From b3fb7914e27009c511e520b290278ef792da02a7 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Tue, 28 Apr 2015 10:31:55 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BE=E7=A8=8B=E9=80=9A=E7=9F=A5=E8=AF=84?= =?UTF-8?q?=E8=AE=BA=E7=BC=96=E8=BE=91=E6=A1=86=E4=B8=8D=E5=8F=AF=E7=94=A8?= =?UTF-8?q?=EF=BC=8C=E8=A7=A3=E5=86=B3=E6=96=B9=E6=A1=88=EF=BC=9A=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E8=B7=B3=E8=BD=AC=E5=88=B0=E6=96=B0=E7=9A=84=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/news_controller.rb | 3 +++ app/views/news/_course_form.html.erb | 10 +++++----- app/views/news/_course_show.html.erb | 14 +------------- app/views/news/edit.html.erb | 23 +++++++++++------------ 4 files changed, 20 insertions(+), 30 deletions(-) diff --git a/app/controllers/news_controller.rb b/app/controllers/news_controller.rb index d41491349..f71a77ca7 100644 --- a/app/controllers/news_controller.rb +++ b/app/controllers/news_controller.rb @@ -152,6 +152,9 @@ class NewsController < ApplicationController end def edit + if @course + render :layout => "base_courses" + end end def update diff --git a/app/views/news/_course_form.html.erb b/app/views/news/_course_form.html.erb index b8b3e36a4..b757ab274 100644 --- a/app/views/news/_course_form.html.erb +++ b/app/views/news/_course_form.html.erb @@ -1,10 +1,10 @@ <%= javascript_include_tag "/assets/kindeditor/kindeditor" %> -