|
|
|
@ -30,10 +30,12 @@ class BoardsController < ApplicationController
|
|
|
|
|
def index
|
|
|
|
|
@boards = @project.boards.includes(:last_message => :author).all
|
|
|
|
|
# show the board if there is only one
|
|
|
|
|
unless @project.project_type == 1
|
|
|
|
|
if @boards.size == 1
|
|
|
|
|
@board = @boards.first
|
|
|
|
|
show
|
|
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
if @project.project_type == 1
|
|
|
|
|
render :layout => 'base_courses'
|
|
|
|
|
else
|
|
|
|
@ -88,9 +90,7 @@ 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
|
|
|
|
|