From c6d71b7b8e5e8dc22da9b8aab392196d1987fd68 Mon Sep 17 00:00:00 2001 From: Riyad Preukschas Date: Fri, 14 Sep 2012 05:21:58 +0200 Subject: [PATCH] Rename 'notes/per_line_show' partial to 'notes/per_line_note' --- app/views/commits/_text_file.html.haml | 2 +- app/views/notes/_create_per_line_note.js.haml | 4 ++-- app/views/notes/_per_line_note.html.haml | 5 +++++ app/views/notes/_per_line_show.html.haml | 5 ----- 4 files changed, 8 insertions(+), 8 deletions(-) create mode 100644 app/views/notes/_per_line_note.html.haml delete mode 100644 app/views/notes/_per_line_show.html.haml diff --git a/app/views/commits/_text_file.html.haml b/app/views/commits/_text_file.html.haml index f7dae30..7626a01 100644 --- a/app/views/commits/_text_file.html.haml +++ b/app/views/commits/_text_file.html.haml @@ -21,6 +21,6 @@ - comments = @line_notes.select { |n| n.line_code == line_code }.sort_by(&:created_at) - unless comments.empty? - comments.each_with_index do |note, i| - = render "notes/per_line_show", note: note + = render "notes/per_line_note", note: note - @line_notes.reject!{ |n| n == note } = render "notes/per_line_reply_button", line_code: line_code diff --git a/app/views/notes/_create_per_line_note.js.haml b/app/views/notes/_create_per_line_note.js.haml index d7f0a0d..180960e 100644 --- a/app/views/notes/_create_per_line_note.js.haml +++ b/app/views/notes/_create_per_line_note.js.haml @@ -12,8 +12,8 @@ var trEl = $(".#{note.line_code}").parent(); // ... and insert the note and the reply button after it trEl.after("#{escape_javascript(render "notes/per_line_reply_button", line_code: note.line_code)}"); - trEl.after("#{escape_javascript(render "notes/per_line_show", note: note)}"); + trEl.after("#{escape_javascript(render "notes/per_line_note", note: note)}"); } else { // instert new note before reply button - trRpl.before("#{escape_javascript(render "notes/per_line_show", note: note)}"); + trRpl.before("#{escape_javascript(render "notes/per_line_note", note: note)}"); } diff --git a/app/views/notes/_per_line_note.html.haml b/app/views/notes/_per_line_note.html.haml new file mode 100644 index 0000000..28bcd6e --- /dev/null +++ b/app/views/notes/_per_line_note.html.haml @@ -0,0 +1,5 @@ +%tr.line_notes_row + %td{colspan: 3} + %ul + = render "notes/note", note: note + diff --git a/app/views/notes/_per_line_show.html.haml b/app/views/notes/_per_line_show.html.haml deleted file mode 100644 index 28bcd6e..0000000 --- a/app/views/notes/_per_line_show.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -%tr.line_notes_row - %td{colspan: 3} - %ul - = render "notes/note", note: note - -- libgit2 0.21.2