Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2015-06-06 01:24:05 +0300
committerStan Hu <stanhu@gmail.com>2015-06-16 16:11:59 +0300
commita7932fe2fd63da4864afb01bff859f4e1fbe9576 (patch)
treecf217e07d0b4f468e0a3378407d7fddc29bd5310 /app/helpers
parent903132bc079970787333347209f6baebdd48800f (diff)
Support commenting on a diff in side-by-side view
Closes https://github.com/gitlabhq/gitlabhq/issues/9283
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/notes_helper.rb10
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',