diff options
Diffstat (limited to 'app/helpers/notes_helper.rb')
-rw-r--r-- | app/helpers/notes_helper.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb index 9ed38ba84b2..da1969b344d 100644 --- a/app/helpers/notes_helper.rb +++ b/app/helpers/notes_helper.rb @@ -61,4 +61,23 @@ module NotesHelper link_to "", "javascript:;", class: "add-diff-note js-add-diff-note-button", data: data, title: "Add a comment to this line" end + + def link_to_reply_diff(note) + return unless current_user + + data = { + noteable_type: note.noteable_type, + noteable_id: note.noteable_id, + commit_id: note.commit_id, + line_code: note.line_code, + discussion_id: note.discussion_id + } + + link_to "javascript:;", class: "btn reply-btn js-discussion-reply-button", + data: data, title: "Add a reply" do + link_text = "" + link_text < content_tag(:i, nil, class: 'icon-comment') + link_text << "Reply" + end + end end |