From 9da4d06a87a302f3f37ca95ba5b6e89cc66c0a82 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Tue, 10 Jan 2012 22:08:46 +0200 Subject: per line comments display --- app/views/commits/_text_file.html.haml | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'app/views/commits/_text_file.html.haml') diff --git a/app/views/commits/_text_file.html.haml b/app/views/commits/_text_file.html.haml index 954722b1f31..5a6d7e44891 100644 --- a/app/views/commits/_text_file.html.haml +++ b/app/views/commits/_text_file.html.haml @@ -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] == "-" -- cgit v1.2.3