2013-11-27 03:00:14 -05:00
|
|
|
/ Side-by-side diff view
|
2014-04-24 04:49:01 -04:00
|
|
|
%div.text-file
|
|
|
|
%table
|
2014-09-04 05:25:14 -04:00
|
|
|
- side_diff_line(diff, index) do |line, type, line_code, line_new, line_old, raw_line, next_line|
|
2014-09-04 04:46:35 -04:00
|
|
|
- next if type == 'new'
|
2014-09-03 05:06:08 -04:00
|
|
|
%tr.line_holder.parallel{ id: line_code, class: "#{type}" }
|
2014-09-04 05:25:14 -04:00
|
|
|
- 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
|
2014-09-04 04:46:35 -04:00
|
|
|
= link_to raw(line_old), "##{line_code}", id: line_code
|
2014-09-03 05:06:08 -04:00
|
|
|
- if type == 'old'
|
2014-09-04 04:46:35 -04:00
|
|
|
%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}}
|
2014-09-04 04:46:35 -04:00
|
|
|
= 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
|