From 37bd3383110469234b29f0aefcb3d4b2dcff1c00 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Mon, 23 Mar 2015 19:55:29 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E8=80=81=E5=B8=88=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E4=BD=9C=E4=B8=9A=E5=A2=9E=E5=8A=A0=E9=BB=98=E8=AE=A4=E5=80=BC?= =?UTF-8?q?=E6=98=BE=E7=A4=BA=202=E3=80=81=E5=AD=A6=E7=94=9F=E6=8F=90?= =?UTF-8?q?=E4=BA=A4=E4=BD=9C=E4=B8=9A=E5=88=97=E8=A1=A8=E4=BF=AE=E6=94=B9?= =?UTF-8?q?layout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/bids_controller.rb | 21 +-- app/controllers/homework_attach_controller.rb | 2 +- app/views/bids/_new_homework_form.html.erb | 12 +- app/views/bids/edit.html.erb | 130 +----------------- app/views/courses/new_homework.html.erb | 2 +- public/stylesheets/css.css | 10 +- 6 files changed, 26 insertions(+), 151 deletions(-) diff --git a/app/controllers/bids_controller.rb b/app/controllers/bids_controller.rb index a22012390..ff9b018df 100644 --- a/app/controllers/bids_controller.rb +++ b/app/controllers/bids_controller.rb @@ -230,7 +230,7 @@ class BidsController < ApplicationController case @bid.reward_type when 3 html_title(l(:label_question_student)) - layout_file = 'base_homework' + layout_file = 'base_courses' when 1 layout_file = 'base_bids' else @@ -307,7 +307,7 @@ class BidsController < ApplicationController respond_to do |format| if @bid.reward_type == 3 format.html { - render :layout => 'base_homework' + render :layout => 'base_courses' } elsif @bid.reward_type == 1 format.html { @@ -333,7 +333,7 @@ class BidsController < ApplicationController respond_to do |format| if @bid.reward_type == 3 format.html { - render :layout => 'base_homework' + render :layout => 'base_courses' } elsif @bid.reward_type == 1 format.html { @@ -361,7 +361,7 @@ class BidsController < ApplicationController respond_to do |format| if @bid.reward_type == 3 format.html { - render :layout => 'base_homework' + render :layout => 'base_courses' } elsif @bid.reward_type == 1 format.html { @@ -439,7 +439,7 @@ class BidsController < ApplicationController respond_to do |format| if @bid.reward_type == 3 format.html { - render :layout => 'base_homework' + render :layout => 'base_courses' } elsif @bid.reward_type == 1 format.html { @@ -533,7 +533,7 @@ class BidsController < ApplicationController if @bid.reward_type == 3 format.html { html_title(l(:label_homework_info)) - render :layout => 'base_homework' + render :layout => 'base_courses' } elsif @bid.reward_type == 1 format.html { @@ -565,7 +565,7 @@ class BidsController < ApplicationController respond_to do |format| if @bid.reward_type == 3 format.html { - render :layout => 'base_homework' + render :layout => 'base_courses' } elsif @bid.reward_type == 1 format.html { @@ -879,7 +879,7 @@ class BidsController < ApplicationController #render html to prepare create submit homework find_bid find_bid - render :layout => 'base_homework' + render :layout => 'base_courses' end def add_homework @@ -942,12 +942,12 @@ class BidsController < ApplicationController @homework_type = false end @user = @bid.author - render :layout => 'base_homework' + render :layout => 'base_courses' end def homework_respond @user = @bid.author - render :layout => 'base_homework' + render :layout => 'base_courses' end def more @@ -1070,6 +1070,7 @@ class BidsController < ApplicationController if params[:id] @bid = Bid.find(params[:id], :include => [{:homeworks => :user}]) @user = @bid.author + @course = @bid.courses.first end rescue render_404 diff --git a/app/controllers/homework_attach_controller.rb b/app/controllers/homework_attach_controller.rb index ba7e92467..e563d997d 100644 --- a/app/controllers/homework_attach_controller.rb +++ b/app/controllers/homework_attach_controller.rb @@ -1,5 +1,5 @@ class HomeworkAttachController < ApplicationController - layout "course_base" + layout "base_courses" include CoursesHelper include HomeworkAttachHelper helper :words diff --git a/app/views/bids/_new_homework_form.html.erb b/app/views/bids/_new_homework_form.html.erb index b9aaf7184..eeaaa602e 100644 --- a/app/views/bids/_new_homework_form.html.erb +++ b/app/views/bids/_new_homework_form.html.erb @@ -8,33 +8,33 @@