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 ++-- .../{_per_line_show.html.haml => _per_line_note.html.haml} | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename app/views/notes/{_per_line_show.html.haml => _per_line_note.html.haml} (100%) diff --git a/app/views/commits/_text_file.html.haml b/app/views/commits/_text_file.html.haml index f7dae301..7626a015 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 d7f0a0dc..180960e3 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_show.html.haml b/app/views/notes/_per_line_note.html.haml similarity index 100% rename from app/views/notes/_per_line_show.html.haml rename to app/views/notes/_per_line_note.html.haml