diff options
author | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2012-09-14 16:57:08 +0200 |
---|---|---|
committer | Riyad Preukschas <riyad@informatik.uni-bremen.de> | 2012-09-14 21:41:57 +0200 |
commit | e1ca155c95a41a9adfe984a3e3ba5c777c61acd8 (patch) | |
tree | 96beb378fcea2749ea0ad6732abe7b38f9e741c2 | |
parent | a3dbd990682f5f39d9c3e58858faf85b9b0a6179 (diff) | |
download | gitlab-ce-e1ca155c95a41a9adfe984a3e3ba5c777c61acd8.tar.gz |
Extract 'notes/per_line_notes_with_reply' partial
-rw-r--r-- | app/views/commits/_text_file.html.haml | 5 | ||||
-rw-r--r-- | app/views/notes/_per_line_notes_with_reply.html.haml | 3 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/views/commits/_text_file.html.haml b/app/views/commits/_text_file.html.haml index 22d2b9ed62c..9f5b5345d5f 100644 --- a/app/views/commits/_text_file.html.haml +++ b/app/views/commits/_text_file.html.haml @@ -20,7 +20,4 @@ - if @comments_allowed - 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/per_line_note", note: note - - @line_notes.reject!{ |n| n == note } - = render "notes/per_line_reply_button", line_code: line_code + = render "notes/per_line_notes_with_reply", notes: comments diff --git a/app/views/notes/_per_line_notes_with_reply.html.haml b/app/views/notes/_per_line_notes_with_reply.html.haml new file mode 100644 index 00000000000..1bcfc41fe20 --- /dev/null +++ b/app/views/notes/_per_line_notes_with_reply.html.haml @@ -0,0 +1,3 @@ +- notes.each do |note| + = render "notes/per_line_note", note: note += render "notes/per_line_reply_button", line_code: notes.first.line_code |