diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-24 13:01:17 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-06-24 13:01:17 +0000 |
commit | 39c2099106b462ed20668b759181fc7d0b0a356c (patch) | |
tree | 94fae78bee6e82b52d2cdff9d7b7876e6984da7a /app/helpers/notes_helper.rb | |
parent | 2d9667df264dae9a11fe58f8320a716d61e48e06 (diff) | |
parent | 8c67c339dc631a6458d87deed7ce011562bb5e2a (diff) | |
download | gitlab-ce-39c2099106b462ed20668b759181fc7d0b0a356c.tar.gz |
Merge branch 'fix-reply-button' into 'master'
Fix reply button
Don't show reply button if user is not signed in. Fixes #1360
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 |