From 9b919939a35f9e5606f86a09eafa2a392d40d1a7 Mon Sep 17 00:00:00 2001 From: Riyad Preukschas Date: Mon, 29 Oct 2012 15:55:37 +0100 Subject: Fix parameter passing and wording for per line notes --- app/controllers/commit_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'app/controllers/commit_controller.rb') diff --git a/app/controllers/commit_controller.rb b/app/controllers/commit_controller.rb index d671e9f9e9e..ebc27772f9a 100644 --- a/app/controllers/commit_controller.rb +++ b/app/controllers/commit_controller.rb @@ -17,7 +17,9 @@ class CommitController < ProjectResourceController @note = result[:note] @line_notes = result[:line_notes] @notes_count = result[:notes_count] - @comments_allowed = true + @comments_allowed = @reply_allowed = true + @comments_target = { noteable_type: 'Commit', + noteable_id: @commit.id } respond_to do |format| format.html do -- cgit v1.2.1 From 494ae87840bf719e5fb4094781cc1dfc179af463 Mon Sep 17 00:00:00 2001 From: Riyad Preukschas Date: Sun, 2 Dec 2012 20:43:39 +0100 Subject: Refactor discussion reply --- app/controllers/commit_controller.rb | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'app/controllers/commit_controller.rb') diff --git a/app/controllers/commit_controller.rb b/app/controllers/commit_controller.rb index ebc27772f9a..4fbfe205d3f 100644 --- a/app/controllers/commit_controller.rb +++ b/app/controllers/commit_controller.rb @@ -13,10 +13,14 @@ class CommitController < ProjectResourceController @commit = result[:commit] git_not_found! unless @commit - @suppress_diff = result[:suppress_diff] - @note = result[:note] - @line_notes = result[:line_notes] - @notes_count = result[:notes_count] + @suppress_diff = result[:suppress_diff] + + @note = result[:note] + @line_notes = result[:line_notes] + @notes_count = result[:notes_count] + @target_type = :commit + @target_id = @commit.id + @comments_allowed = @reply_allowed = true @comments_target = { noteable_type: 'Commit', noteable_id: @commit.id } -- cgit v1.2.1 From 7335f366dc952aa371e1e17cfbe2874d51dd6f16 Mon Sep 17 00:00:00 2001 From: Riyad Preukschas Date: Wed, 2 Jan 2013 20:49:27 +0100 Subject: Fix comment and reply buttons --- app/controllers/commit_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/controllers/commit_controller.rb') diff --git a/app/controllers/commit_controller.rb b/app/controllers/commit_controller.rb index 4fbfe205d3f..1329410891d 100644 --- a/app/controllers/commit_controller.rb +++ b/app/controllers/commit_controller.rb @@ -23,7 +23,7 @@ class CommitController < ProjectResourceController @comments_allowed = @reply_allowed = true @comments_target = { noteable_type: 'Commit', - noteable_id: @commit.id } + commit_id: @commit.id } respond_to do |format| format.html do -- cgit v1.2.1