From 0eca547ec55c87c1a2c02f3f1f4de2cc06035b5e Mon Sep 17 00:00:00 2001 From: z9hang Date: Wed, 6 Aug 2014 15:03:43 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=A4=E4=B8=AA=E5=AF=BC?= =?UTF-8?q?=E8=88=AA=E6=A0=8F=E4=B8=A2=E5=A4=B1=E9=97=AE=E9=A2=98=E3=80=81?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=3D=E3=80=8B=E6=9F=A5=E7=9C=8B?= =?UTF-8?q?=E5=B7=AE=E5=88=AB=EF=BC=8C=E6=B2=A1=E6=9C=89=E5=AF=B9=E5=BA=94?= =?UTF-8?q?=E7=9A=84=E6=96=87=E4=BB=B6=E6=88=96=E4=BF=AE=E8=AE=A2=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E6=97=B6=E6=8A=A5=E9=94=99=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/repositories_controller.rb | 12 +++++++++++- lib/tasks/project_score.rake | 0 .../app/controllers/code_review_controller.rb | 1 + 3 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 lib/tasks/project_score.rake diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 5274bb105..ef4c9b061 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -206,8 +206,15 @@ class RepositoriesController < ApplicationController @repository.committer_ids = params[:committers].values.inject({}) {|h, c| h[c.first] = c.last; h} flash[:notice] = l(:notice_successful_update) redirect_to settings_project_path(@project, :tab => 'repositories') + elsif request.get? + respond_to do |format| + format.html{ + render :layout => "project_base" + } end + + end end def destroy @@ -414,7 +421,10 @@ class RepositoriesController < ApplicationController Digest::MD5.hexdigest("#{@path}-#{@rev}-#{@rev_to}-#{@diff_type}-#{current_language}") unless read_fragment(@cache_key) @diff = @repository.diff(@path, @rev, @rev_to) - show_error_not_found unless @diff + unless @diff + show_error_not_found + return + end end @changeset = @repository.find_changeset_by_name(@rev) diff --git a/lib/tasks/project_score.rake b/lib/tasks/project_score.rake new file mode 100644 index 000000000..e69de29bb diff --git a/plugins/redmine_code_review/app/controllers/code_review_controller.rb b/plugins/redmine_code_review/app/controllers/code_review_controller.rb index 33f5a203a..83a2602fd 100644 --- a/plugins/redmine_code_review/app/controllers/code_review_controller.rb +++ b/plugins/redmine_code_review/app/controllers/code_review_controller.rb @@ -16,6 +16,7 @@ # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. class CodeReviewController < ApplicationController + layout "project_base" unloadable before_filter :find_project, :authorize, :find_user, :find_setting, :find_repository