gitlab-org--gitlab-foss/app/views/projects/commits/_parallel_view.html.haml

23 lines
1.1 KiB
Text
Raw Normal View History

2013-11-27 03:00:14 -05:00
/ Side-by-side diff view
%div.text-file
%table
- side_diff_line(diff, index) do |line, type, line_code, line_new, line_old, raw_line, next_line|
- next if type == 'new'
2014-09-03 05:06:08 -04:00
%tr.line_holder.parallel{ id: line_code, class: "#{type}" }
- if type == "match"
= render "projects/commits/diffs/match_line_parallel", {line: line,
line_old: line_old, line_new: line_new, bottom: false}
- else
2014-09-03 05:06:08 -04:00
%td.old_line
= link_to raw(line_old), "##{line_code}", id: line_code
2014-09-03 05:06:08 -04:00
- if type == 'old'
%td.line_content{class: "parallel noteable_line old #{line_code}", "line_code" => line_code}= raw line
2014-09-03 05:06:08 -04:00
- else
%td.line_content.parallel= line
%td.new_line{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
2014-09-03 05:06:08 -04:00
- else
%td.line_content.parallel= line