From c7f2ab0415742393ca19805e48525a408a54ec28 Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 1 Aug 2016 13:51:11 +0800 Subject: [PATCH 01/49] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=88=9B=E5=BB=BA?= =?UTF-8?q?=E8=8B=B1=E6=96=87=E5=90=8D=E5=AD=97=E7=9A=84=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E6=A0=87=E9=A2=98=E4=B8=BA=E2=80=9C=E4=B8=BA=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E8=AE=A8=E8=AE=BA=E5=8C=BA=E7=9A=84=E9=97=AE=E9=A2=98=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/models/project.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/models/project.rb b/app/models/project.rb index 67f010210..f66b07580 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -1224,8 +1224,7 @@ class Project < ActiveRecord::Base # 创建项目后在项目下同步创建一个讨论区 def create_board_sync @board = self.boards.build - self.name=" #{l(:label_borad_project) }" - @board.name = self.name + @board.name = " #{l(:label_borad_project) }" @board.description = self.name.to_s if @board.save logger.debug "[Project Model] ===> #{@board.to_json}" From 96b04f39b18e40fe4d31bd5d4ac2ccac077d76cd Mon Sep 17 00:00:00 2001 From: huang Date: Mon, 1 Aug 2016 15:33:47 +0800 Subject: [PATCH 02/49] =?UTF-8?q?pull=20requests=E6=A1=86=E6=9E=B6?= =?UTF-8?q?=E6=90=AD=E5=BB=BA=EF=BC=88=E8=B7=AF=E7=94=B1=E6=8E=A7=E5=88=B6?= =?UTF-8?q?=E5=99=A8=E3=80=81views=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/javascripts/pull_rquests.js.coffee | 3 +++ app/assets/stylesheets/pull_rquests.css.scss | 3 +++ app/controllers/pull_rquests_controller.rb | 18 ++++++++++++++++++ app/helpers/pull_rquests_helper.rb | 2 ++ app/views/projects/_development_group.html.erb | 9 +++++++++ app/views/pull_rquests/index.html.erb | 0 app/views/pull_rquests/new.html.erb | 0 app/views/pull_rquests/show.html.erb | 1 + config/routes.rb | 7 +++++++ .../pull_rquests_controller_spec.rb | 5 +++++ 10 files changed, 48 insertions(+) create mode 100644 app/assets/javascripts/pull_rquests.js.coffee create mode 100644 app/assets/stylesheets/pull_rquests.css.scss create mode 100644 app/controllers/pull_rquests_controller.rb create mode 100644 app/helpers/pull_rquests_helper.rb create mode 100644 app/views/pull_rquests/index.html.erb create mode 100644 app/views/pull_rquests/new.html.erb create mode 100644 app/views/pull_rquests/show.html.erb create mode 100644 spec/controllers/pull_rquests_controller_spec.rb diff --git a/app/assets/javascripts/pull_rquests.js.coffee b/app/assets/javascripts/pull_rquests.js.coffee new file mode 100644 index 000000000..761567942 --- /dev/null +++ b/app/assets/javascripts/pull_rquests.js.coffee @@ -0,0 +1,3 @@ +# Place all the behaviors and hooks related to the matching controller here. +# All this logic will automatically be available in application.js. +# You can use CoffeeScript in this file: http://jashkenas.github.com/coffee-script/ diff --git a/app/assets/stylesheets/pull_rquests.css.scss b/app/assets/stylesheets/pull_rquests.css.scss new file mode 100644 index 000000000..89d608475 --- /dev/null +++ b/app/assets/stylesheets/pull_rquests.css.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the pull_rquests controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/pull_rquests_controller.rb b/app/controllers/pull_rquests_controller.rb new file mode 100644 index 000000000..2fcdf79df --- /dev/null +++ b/app/controllers/pull_rquests_controller.rb @@ -0,0 +1,18 @@ +class PullRquestsController < ApplicationController + before_filter :find_project + layout "base_projects" + + def index + + end + + def new + + end + + def find_project + @project = Project.find(params[:project_id]) + rescue ActiveRecord::RecordNotFound + render_404 + end +end diff --git a/app/helpers/pull_rquests_helper.rb b/app/helpers/pull_rquests_helper.rb new file mode 100644 index 000000000..1b3eef9a4 --- /dev/null +++ b/app/helpers/pull_rquests_helper.rb @@ -0,0 +1,2 @@ +module PullRquestsHelper +end diff --git a/app/views/projects/_development_group.html.erb b/app/views/projects/_development_group.html.erb index 2c7d36fb5..a218e368d 100644 --- a/app/views/projects/_development_group.html.erb +++ b/app/views/projects/_development_group.html.erb @@ -57,6 +57,15 @@ <% end %> +<% if User.current.member_of?(@project) %> + +<% end %> +