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-04 15:49:57 +0400
committerMarin Jankovski <marin@gitlab.com>2014-09-08 11:05:17 +0400
commitdc7554d020f7e278f30c8d4c4113a19f7c3cd82f (patch)
tree6e2ecc26f0482467e21dcc97b36f5abc9e2342ff /app
parent75b04a17cf27cd7f7a252a697f347c08d58e2fd4 (diff)
Coloring.
Diffstat (limited to 'app')
-rw-r--r--app/views/projects/commits/_parallel_view.html.haml23
1 files changed, 13 insertions, 10 deletions
diff --git a/app/views/projects/commits/_parallel_view.html.haml b/app/views/projects/commits/_parallel_view.html.haml
index f23051f2511..97e1c884b7b 100644
--- a/app/views/projects/commits/_parallel_view.html.haml
+++ b/app/views/projects/commits/_parallel_view.html.haml
@@ -2,29 +2,32 @@
%div.text-file
%table
- side_diff_line(diff, index) do |line, type, line_code, line_new, line_old, raw_line, next_line|
- %tr.line_holder.parallel{ id: line_code, class: "#{type}" }
+ %tr.line_holder.parallel{ id: line_code }
- if type == "match"
= render "projects/commits/diffs/match_line_parallel", {line: line,
line_old: line_old, line_new: line_new, bottom: false}
- else
- %td.old_line
- - if diff.new_file
- %td.line_content.parallel= " "
- - else
+ - if diff.new_file
+ %td.old_line{ class: "old" }
+ %td.line_content.parallel= " "
+ - else
+ - next if type == 'new'
+ %td.old_line{ class: "#{type}" }
= link_to raw(line_old), "##{line_code}", id: line_code
- if type == 'old'
%td.line_content{class: "parallel noteable_line old #{line_code}", "line_code" => line_code}= raw line
- else
%td.line_content.parallel= raw line
- %td.new_line{data: {linenumber: line_new}}
- - if diff.deleted_file
- %td.line_content.parallel= " "
- - else
+ - if diff.deleted_file
+ %td.new_line{class: "new", data: {linenumber: line_new}}
+ %td.line_content.parallel= " "
+ - else
+ %td.new_line{class: "#{type}", data: {linenumber: line_new}}
= link_to raw(line_new) , "##{line_code}", id: line_code
- if type == 'old'
%td.line_content.parallel{class: "noteable_line new #{line_code}", "line_code" => line_code}= raw next_line
- else
- %td.line_content.parallel= raw line
+ %td.line_content.parallel{class: "#{type}"}= raw line
- if diff.diff.blank? && diff_file_mode_changed?(diff)
.file-mode-changed