diff --git a/app/controllers/boards_controller.rb b/app/controllers/boards_controller.rb index 81192c597..f05625322 100644 --- a/app/controllers/boards_controller.rb +++ b/app/controllers/boards_controller.rb @@ -42,6 +42,7 @@ class BoardsController < ApplicationController end def show + respond_to do |format| format.html { sort_init 'updated_on', 'desc' @@ -60,7 +61,7 @@ class BoardsController < ApplicationController preload(:author, {:last_reply => :author}). all @message = Message.new(:board => @board) - if @project.project_type + if @project.project_type ==1 render :action => 'show', :layout => 'base_courses' else render :action => 'show', :layout => !request.xhr? @@ -80,7 +81,7 @@ class BoardsController < ApplicationController def new @board = @project.boards.build @board.safe_attributes = params[:board] - if @project.project_type + if @project.project_type == 1 render :layout => 'base_courses' end end @@ -88,6 +89,9 @@ class BoardsController < ApplicationController def create @board = @project.boards.build @board.safe_attributes = params[:board] + if @project.project_type == 1 + render :layout => 'base_courses' + end if @board.save flash[:notice] = l(:notice_successful_create) #Modified by young @@ -103,7 +107,7 @@ class BoardsController < ApplicationController end def update - if @project.project_type + if @project.project_type ==1 render :layout => 'base_courses' end @board.safe_attributes = params[:board]