Commit c6d71b7b8e5e8dc22da9b8aab392196d1987fd68

Authored by Riyad Preukschas
1 parent dd1b3177

Rename 'notes/per_line_show' partial to 'notes/per_line_note'

app/views/commits/_text_file.html.haml
@@ -21,6 +21,6 @@ @@ -21,6 +21,6 @@
21 - comments = @line_notes.select { |n| n.line_code == line_code }.sort_by(&:created_at) 21 - comments = @line_notes.select { |n| n.line_code == line_code }.sort_by(&:created_at)
22 - unless comments.empty? 22 - unless comments.empty?
23 - comments.each_with_index do |note, i| 23 - comments.each_with_index do |note, i|
24 - = render "notes/per_line_show", note: note 24 + = render "notes/per_line_note", note: note
25 - @line_notes.reject!{ |n| n == note } 25 - @line_notes.reject!{ |n| n == note }
26 = render "notes/per_line_reply_button", line_code: line_code 26 = render "notes/per_line_reply_button", line_code: line_code
app/views/notes/_create_per_line_note.js.haml
@@ -12,8 +12,8 @@ @@ -12,8 +12,8 @@
12 var trEl = $(".#{note.line_code}").parent(); 12 var trEl = $(".#{note.line_code}").parent();
13 // ... and insert the note and the reply button after it 13 // ... and insert the note and the reply button after it
14 trEl.after("#{escape_javascript(render "notes/per_line_reply_button", line_code: note.line_code)}"); 14 trEl.after("#{escape_javascript(render "notes/per_line_reply_button", line_code: note.line_code)}");
15 - trEl.after("#{escape_javascript(render "notes/per_line_show", note: note)}"); 15 + trEl.after("#{escape_javascript(render "notes/per_line_note", note: note)}");
16 } else { 16 } else {
17 // instert new note before reply button 17 // instert new note before reply button
18 - trRpl.before("#{escape_javascript(render "notes/per_line_show", note: note)}"); 18 + trRpl.before("#{escape_javascript(render "notes/per_line_note", note: note)}");
19 } 19 }
app/views/notes/_per_line_note.html.haml 0 → 100644
@@ -0,0 +1,5 @@ @@ -0,0 +1,5 @@
  1 +%tr.line_notes_row
  2 + %td{colspan: 3}
  3 + %ul
  4 + = render "notes/note", note: note
  5 +
app/views/notes/_per_line_show.html.haml
@@ -1,5 +0,0 @@ @@ -1,5 +0,0 @@
1 -%tr.line_notes_row  
2 - %td{colspan: 3}  
3 - %ul  
4 - = render "notes/note", note: note  
5 -