Chris@0: <% diff = Redmine::UnifiedDiff.new(diff, :type => diff_type, :max_lines => Setting.diff_max_lines_displayed.to_i) -%> Chris@0: <% diff.each do |table_file| -%> Chris@0:
Chris@0: <% if diff_type == 'sbs' -%> Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: <% prev_line_left, prev_line_right = nil, nil -%> Chris@0: <% table_file.keys.sort.each do |key| -%> Chris@0: <% if prev_line_left && prev_line_right && (table_file[key].nb_line_left != prev_line_left+1) && (table_file[key].nb_line_right != prev_line_right+1) -%> Chris@0: Chris@0: Chris@0: <% end -%> Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: <% prev_line_left, prev_line_right = table_file[key].nb_line_left.to_i, table_file[key].nb_line_right.to_i -%> Chris@0: <% end -%> Chris@0: Chris@0:
<%= table_file.file_name %>
......
<%= table_file[key].nb_line_left %> Chris@0:
<%=to_utf8 table_file[key].line_left %>
Chris@0:
<%= table_file[key].nb_line_right %> Chris@0:
<%=to_utf8 table_file[key].line_right %>
Chris@0:
Chris@0: Chris@0: <% else -%> Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: Chris@0: <% prev_line_left, prev_line_right = nil, nil -%> Chris@0: <% table_file.keys.sort.each do |key, line| %> Chris@0: <% if prev_line_left && prev_line_right && (table_file[key].nb_line_left != prev_line_left+1) && (table_file[key].nb_line_right != prev_line_right+1) -%> Chris@0: Chris@0: Chris@0: Chris@0: <% end -%> Chris@0: Chris@0: Chris@0: Chris@0: <% if table_file[key].line_left.empty? -%> Chris@0: Chris@0: <% else -%> Chris@0: Chris@0: <% end -%> Chris@0: Chris@0: <% prev_line_left = table_file[key].nb_line_left.to_i if table_file[key].nb_line_left.to_i > 0 -%> Chris@0: <% prev_line_right = table_file[key].nb_line_right.to_i if table_file[key].nb_line_right.to_i > 0 -%> Chris@0: <% end -%> Chris@0: Chris@0:
<%= table_file.file_name %>
......
<%= table_file[key].nb_line_left %><%= table_file[key].nb_line_right %> Chris@0:
<%=to_utf8 table_file[key].line_right %>
Chris@0:
Chris@0:
<%=to_utf8 table_file[key].line_left %>
Chris@0:
Chris@0: <% end -%> Chris@0: Chris@0:
Chris@0: <% end -%> Chris@0: Chris@0: <%= l(:text_diff_truncated) if diff.truncated? %>