per line comments display

This commit is contained in:
Dmitriy Zaporozhets 2012-01-10 22:08:46 +02:00
parent c66bc99fb7
commit 9da4d06a87
7 changed files with 78 additions and 2 deletions

View file

@ -19,6 +19,13 @@
%td.new_line
= link_to raw(diff_line_class(line) == "old" ? " " : line_new) , "#NEW#{index}-#{line_new}", :id => "NEW#{index}-#{line_new}"
%td.line_content{:class => diff_line_class(full_line)}= raw "#{full_line}  "
- comments = @line_notes.select { |n| n.for_line?(index, line_old, line_new) }.sort_by(&:created_at).reverse
- unless comments.empty?
%tr.line_notes_row
%td{:colspan => 3}
%ul
- comments.each do |note|
= render :partial => "notes/show", :locals => {:note => note}
- if line[0] == "+"
- line_new += 1
- elsif line[0] == "-"