Commit 6d5c29dc authored by Riyad Preukschas's avatar Riyad Preukschas

Inline diff_notes_reply_button partial

parent 3bc507e5
...@@ -11,8 +11,7 @@ ...@@ -11,8 +11,7 @@
// find the commented line ... // find the commented line ...
var trEl = $(".#{note.line_code}").parent(); var trEl = $(".#{note.line_code}").parent();
// ... and insert the note and the reply button after it // ... and insert the note and the reply button after it
trEl.after("#{escape_javascript(render "notes/diff_notes_reply_button", note: note)}"); trEl.after("#{escape_javascript(render "notes/diff_notes_with_reply", notes: [note])}");
trEl.after("#{escape_javascript(render "notes/diff_note", note: note)}");
} else { } else {
// instert new note before reply button // instert new note before reply button
trRpl.before("#{escape_javascript(render "notes/diff_note", note: note)}"); trRpl.before("#{escape_javascript(render "notes/diff_note", note: note)}");
......
%tr.line_notes_row.reply
%td{colspan: 3}
= link_to "javascript:;",
class: "line_note_reply_link js-note-add-to-diff-line",
data: { line_code: note.line_code,
noteable_type: note.noteable_type,
noteable_id: note.noteable_id },
title: "Add a comment to this line" do
%i.icon-comment
Reply
- notes.each do |note| - notes.each do |note|
= render "notes/diff_note", note: note = render "notes/diff_note", note: note
= render "notes/diff_notes_reply_button", note: notes.first
-# reply button
- note = notes.first # example note
%tr.line_notes_row.reply
%td{colspan: 3}
= link_to "javascript:;",
class: "line_note_reply_link js-note-add-to-diff-line",
data: { line_code: note.line_code,
noteable_type: note.noteable_type,
noteable_id: note.noteable_id },
title: "Add a comment to this line" do
%i.icon-comment
Reply
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment