Commit 20e009a40a4fa5d7e5517833e14c16b32b461720
1 parent
e802d009
Exists in
master
and in
4 other branches
Update diff comments order and rendering
Showing
3 changed files
with
4 additions
and
4 deletions
Show diff stats
app/views/commits/_text_file.html.haml
| @@ -18,9 +18,9 @@ | @@ -18,9 +18,9 @@ | ||
| 18 | %td.line_content{class: "noteable_line #{type} #{line_code}", "line_code" => line_code}= raw "#{line} " | 18 | %td.line_content{class: "noteable_line #{type} #{line_code}", "line_code" => line_code}= raw "#{line} " |
| 19 | 19 | ||
| 20 | - if @comments_allowed | 20 | - if @comments_allowed |
| 21 | - - comments = @line_notes.select { |n| n.line_code == line_code }.sort_by(&:created_at).reverse | 21 | + - comments = @line_notes.select { |n| n.line_code == line_code }.sort_by(&:created_at) |
| 22 | - unless comments.empty? | 22 | - unless comments.empty? |
| 23 | - comments.each_with_index do |note, i| | 23 | - comments.each_with_index do |note, i| |
| 24 | - = render "notes/reply_button", line_code: line_code if i.zero? | ||
| 25 | = render "notes/per_line_show", note: note | 24 | = render "notes/per_line_show", note: note |
| 26 | - @line_notes.reject!{ |n| n == note } | 25 | - @line_notes.reject!{ |n| n == note } |
| 26 | + = render "notes/reply_button", line_code: line_code |
app/views/notes/_create_common.js.haml