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
path: root/app
diff options
context:
space:
mode:
authorMarin Jankovski <marin@gitlab.com>2014-09-05 12:55:17 +0400
committerMarin Jankovski <marin@gitlab.com>2014-09-08 11:05:17 +0400
commit13cfa49a3dc90e87a5f6de8cd5c64d0cd0f4202d (patch)
treec2038b9c8d63625b7e894ad059e312d61216a27f /app
parent7d45624daff1ed4a3896c6270a0911a73f6f815f (diff)
Color the lines correctly.
Diffstat (limited to 'app')
-rw-r--r--app/views/projects/commits/_parallel_view.html.haml18
1 files changed, 10 insertions, 8 deletions
diff --git a/app/views/projects/commits/_parallel_view.html.haml b/app/views/projects/commits/_parallel_view.html.haml
index 1d3aa1bf25a..a940330aec6 100644
--- a/app/views/projects/commits/_parallel_view.html.haml
+++ b/app/views/projects/commits/_parallel_view.html.haml
@@ -8,8 +8,8 @@
line_old: line_old, line_new: line_new, bottom: false}
- else
- if diff.new_file
- %td.old_line{ class: "old" }
- %td.line_content.parallel= " "
+ %td.old_line
+ %td.line_content.parallel= raw "&nbsp;"
- else
- next if type == 'new'
%td.old_line{ class: "#{type}" }
@@ -19,18 +19,20 @@
- else
%td.line_content.parallel= raw line
- if diff.deleted_file
- %td.new_line{class: "new", data: {linenumber: line_new}}
- %td.line_content.parallel= " "
+ %td.new_line{ data: {linenumber: line_new}}
+ %td.line_content.parallel= raw "&nbsp;"
- else
- %td.new_line{class: "#{type}", data: {linenumber: line_new}}
- - if type == 'old'
+ - if type == 'old'
+ %td.new_line{class: "#{next_type == 'new' ? 'new' : nil}", data: {linenumber: line_new}}
- if next_type == 'new'
- content = next_line
= link_to raw(line_new) , "##{line_code}", id: line_code
+ %td.line_content.parallel{class: "noteable_line new #{line_code}", "line_code" => line_code}= raw content
- else
- content = "&nbsp;"
- %td.line_content.parallel{class: "noteable_line new #{line_code}", "line_code" => line_code}= raw content
- - else
+ %td.line_content.parallel{class: "noteable_line #{line_code}", "line_code" => line_code}= raw content
+ - else
+ %td.new_line{class: "#{type}", data: {linenumber: line_new}}
= link_to raw(line_new) , "##{line_code}", id: line_code
%td.line_content.parallel{class: "#{type}"}= raw line