diff options
author | Stan Hu <stanhu@gmail.com> | 2015-06-05 15:24:05 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2015-06-16 06:11:59 -0700 |
commit | a7932fe2fd63da4864afb01bff859f4e1fbe9576 (patch) | |
tree | cf217e07d0b4f468e0a3378407d7fddc29bd5310 /app/helpers/notes_helper.rb | |
parent | 903132bc079970787333347209f6baebdd48800f (diff) | |
download | gitlab-ce-a7932fe2fd63da4864afb01bff859f4e1fbe9576.tar.gz |
Support commenting on a diff in side-by-side view
Closes https://github.com/gitlabhq/gitlabhq/issues/9283
Diffstat (limited to 'app/helpers/notes_helper.rb')
-rw-r--r-- | app/helpers/notes_helper.rb | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb index 271b53aa2b6..a7c1fa0b071 100644 --- a/app/helpers/notes_helper.rb +++ b/app/helpers/notes_helper.rb @@ -47,7 +47,7 @@ module NotesHelper }.to_json end - def link_to_new_diff_note(line_code) + def link_to_new_diff_note(line_code, line_type = nil) discussion_id = Note.build_discussion_id( @comments_target[:noteable_type], @comments_target[:noteable_id] || @comments_target[:commit_id], @@ -59,7 +59,8 @@ module NotesHelper noteable_id: @comments_target[:noteable_id], commit_id: @comments_target[:commit_id], line_code: line_code, - discussion_id: discussion_id + discussion_id: discussion_id, + line_type: line_type } button_tag(class: 'btn add-diff-note js-add-diff-note-button', @@ -69,7 +70,7 @@ module NotesHelper end end - def link_to_reply_diff(note) + def link_to_reply_diff(note, line_type = nil) return unless current_user data = { @@ -77,7 +78,8 @@ module NotesHelper noteable_id: note.noteable_id, commit_id: note.commit_id, line_code: note.line_code, - discussion_id: note.discussion_id + discussion_id: note.discussion_id, + line_type: line_type } button_tag class: 'btn reply-btn js-discussion-reply-button', |