diff options
author | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2012-11-17 20:34:52 +0100 |
---|---|---|
committer | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2012-12-03 22:51:56 +0100 |
commit | 6d5c29dc2b08531fd82550e2e9e814382f58bb78 (patch) | |
tree | 5e92a94f0ab9e96fb7d9d25da20103cd33b5f31f /app/views/notes | |
parent | 3bc507e5c5139c3e43558152675e222dd4b25927 (diff) | |
download | gitlab-ce-6d5c29dc2b08531fd82550e2e9e814382f58bb78.tar.gz |
Inline diff_notes_reply_button partial
Diffstat (limited to 'app/views/notes')
-rw-r--r-- | app/views/notes/_create_diff_note.js.haml | 3 | ||||
-rw-r--r-- | app/views/notes/_diff_notes_reply_button.html.haml | 10 | ||||
-rw-r--r-- | app/views/notes/_diff_notes_with_reply.html.haml | 14 |
3 files changed, 14 insertions, 13 deletions
diff --git a/app/views/notes/_create_diff_note.js.haml b/app/views/notes/_create_diff_note.js.haml index 453053bd728..462229bfe5d 100644 --- a/app/views/notes/_create_diff_note.js.haml +++ b/app/views/notes/_create_diff_note.js.haml @@ -11,8 +11,7 @@ // find the commented line ... var trEl = $(".#{note.line_code}").parent(); // ... 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_note", note: note)}"); + trEl.after("#{escape_javascript(render "notes/diff_notes_with_reply", notes: [note])}"); } else { // instert new note before reply button trRpl.before("#{escape_javascript(render "notes/diff_note", note: note)}"); diff --git a/app/views/notes/_diff_notes_reply_button.html.haml b/app/views/notes/_diff_notes_reply_button.html.haml deleted file mode 100644 index edd84eaef2d..00000000000 --- a/app/views/notes/_diff_notes_reply_button.html.haml +++ /dev/null @@ -1,10 +0,0 @@ -%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 diff --git a/app/views/notes/_diff_notes_with_reply.html.haml b/app/views/notes/_diff_notes_with_reply.html.haml index 43f954d532f..7ae328b83ed 100644 --- a/app/views/notes/_diff_notes_with_reply.html.haml +++ b/app/views/notes/_diff_notes_with_reply.html.haml @@ -1,3 +1,15 @@ - notes.each do |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 |