summaryrefslogtreecommitdiff
path: root/app/helpers/notes_helper.rb
diff options
context:
space:
mode:
authorJacob Schatz <jschatz1@gmail.com>2016-06-18 11:19:57 -0400
committerPaco Guzman <pacoguzmanp@gmail.com>2016-07-06 08:29:57 +0200
commite065f4848b257256141752e6498398cd68fa7786 (patch)
tree5b2775a3ad3e7f02d668faf850b0d31e5c76f4a2 /app/helpers/notes_helper.rb
parentcfd5870b62e9d76e564ffc64db1d1281b4a363bb (diff)
downloadgitlab-ce-e065f4848b257256141752e6498398cd68fa7786.tar.gz
Diffs will create button/diff form on demand no on server side
Diffstat (limited to 'app/helpers/notes_helper.rb')
-rw-r--r--app/helpers/notes_helper.rb20
1 files changed, 2 insertions, 18 deletions
diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb
index e85ba76887d..42419aa908e 100644
--- a/app/helpers/notes_helper.rb
+++ b/app/helpers/notes_helper.rb
@@ -24,28 +24,12 @@ module NotesHelper
}.to_json
end
- def link_to_new_diff_note(line_code, line_type = nil)
- discussion_id = LegacyDiffNote.build_discussion_id(
+ def discussion_id(line_code)
+ LegacyDiffNote.build_discussion_id(
@comments_target[:noteable_type],
@comments_target[:noteable_id] || @comments_target[:commit_id],
line_code
)
-
- data = {
- noteable_type: @comments_target[:noteable_type],
- noteable_id: @comments_target[:noteable_id],
- commit_id: @comments_target[:commit_id],
- line_type: line_type,
- line_code: line_code,
- note_type: LegacyDiffNote.name,
- discussion_id: discussion_id
- }
-
- button_tag(class: 'btn add-diff-note js-add-diff-note-button',
- data: data,
- title: 'Add a comment to this line') do
- icon('comment-o')
- end
end
def link_to_reply_discussion(note, line_type = nil)