Update diff comments order and rendering

This commit is contained in:
Riyad Preukschas 2012-09-14 01:21:39 +02:00
parent e802d00996
commit 20e009a40a
3 changed files with 4 additions and 4 deletions

View file

@ -18,9 +18,9 @@
%td.line_content{class: "noteable_line #{type} #{line_code}", "line_code" => line_code}= raw "#{line}  "
- if @comments_allowed
- comments = @line_notes.select { |n| n.line_code == line_code }.sort_by(&:created_at).reverse
- 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/reply_button", line_code: line_code if i.zero?
= render "notes/per_line_show", note: note
- @line_notes.reject!{ |n| n == note }
= render "notes/reply_button", line_code: line_code

View file

@ -9,5 +9,5 @@
- else
:plain
$(".note-form-holder").replaceWith("#{escape_javascript(render('form'))}");
$(".note-form-holder").replaceWith("#{escape_javascript(render 'form')}");

View file

@ -1,5 +1,5 @@
%tr.line_notes_row
%td{colspan: 3}
%ul
= render partial: "notes/show", locals: {note: note}
= render "notes/show", note: note