From 6dc692bb6abedb97e448cb012454c14f496550b6 Mon Sep 17 00:00:00 2001 From: huangjingquan Date: Wed, 27 Nov 2013 16:40:47 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BA=86=E4=B8=BB=E9=A1=B5?= =?UTF-8?q?=E3=80=81=E8=AE=BA=E5=9D=9B=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/project.rb | 7 ++++++- app/views/boards/show.html.erb | 18 +++++++++++++----- app/views/welcome/index.html.erb | 25 ++++++++++--------------- config/locales/zh.yml | 2 ++ public/stylesheets/application.css | 19 ++++++++++++------- 5 files changed, 43 insertions(+), 28 deletions(-) diff --git a/app/models/project.rb b/app/models/project.rb index 36a28e1b6..f371af8e4 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1092,8 +1092,13 @@ class Project < ActiveRecord::Base # 创建项目后在项目下同步创建一个讨论区 def create_board_sync @board = self.boards.build + if project_type == 1 + self.name=" #{l(:label_borad_course) }" + else + self.name =" #{l(:label_borad_project) }" + end @board.name = self.name - @board.description = self.name.to_s << " #{l(:label_board) }" + @board.description = self.name.to_s if @board.save logger.debug "[Project Model] ===> #{@board.to_json}" else diff --git a/app/views/boards/show.html.erb b/app/views/boards/show.html.erb index 7761e499e..ad05362b2 100644 --- a/app/views/boards/show.html.erb +++ b/app/views/boards/show.html.erb @@ -1,13 +1,13 @@ -
+ -
+