diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-24 13:34:46 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-24 13:34:46 +0300 |
commit | a49d45db419bcba4cb80919bdb3e1699725b15ce (patch) | |
tree | 0f146435aee06c34b5cc4f88a8d72cf7819676f1 /app/helpers/notes_helper.rb | |
parent | 2d9667df264dae9a11fe58f8320a716d61e48e06 (diff) | |
download | gitlab-ce-a49d45db419bcba4cb80919bdb3e1699725b15ce.tar.gz |
Move reply button to helper from view
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/helpers/notes_helper.rb')
-rw-r--r-- | app/helpers/notes_helper.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb index 9ed38ba84b2..c0135b77128 100644 --- a/app/helpers/notes_helper.rb +++ b/app/helpers/notes_helper.rb @@ -61,4 +61,21 @@ 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) + 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 |