Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-01-11 00:08:46 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2012-01-11 00:08:46 +0400
commit9da4d06a87a302f3f37ca95ba5b6e89cc66c0a82 (patch)
treeaa3d15cda5bcb5ddcf5b56334c498bd7f3ea3be5 /app/views/commits/_text_file.html.haml
parentc66bc99fb7d22d005cf0de687b9535f8bef52e23 (diff)
per line comments display
Diffstat (limited to 'app/views/commits/_text_file.html.haml')
-rw-r--r--app/views/commits/_text_file.html.haml7
1 files changed, 7 insertions, 0 deletions
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" ? "&nbsp;" : line_new) , "#NEW#{index}-#{line_new}", :id => "NEW#{index}-#{line_new}"
%td.line_content{:class => diff_line_class(full_line)}= raw "#{full_line} &nbsp;"
+ - 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] == "-"