_diff.html.erb
67 lines
| 1.7 KiB
| text/plain
|
TextLexer
|
r7744 | <% diff = Redmine::UnifiedDiff.new( | ||
diff, :type => diff_type, | ||||
:max_lines => Setting.diff_max_lines_displayed.to_i) -%> | ||||
|
r4974 | |||
|
r2110 | <% diff.each do |table_file| -%> | ||
|
r1501 | <div class="autoscroll"> | ||
|
r4974 | <% if diff.diff_type == 'sbs' -%> | ||
|
r3471 | <table class="filecontent"> | ||
|
r1501 | <thead> | ||
|
r7751 | <tr> | ||
<th colspan="4" class="filename"> | ||||
<%= h(Redmine::CodesetUtil.to_utf8_by_setting(table_file.file_name)) %> | ||||
</th> | ||||
</tr> | ||||
|
r1501 | </thead> | ||
<tbody> | ||||
|
r4974 | <% table_file.each_line do |spacing, line| -%> | ||
<% if spacing -%> | ||||
|
r1509 | <tr class="spacing"> | ||
|
r4974 | <th class="line-num">...</th><td></td><th class="line-num">...</th><td></td> | ||
</tr> | ||||
|
r1501 | <% end -%> | ||
<tr> | ||||
|
r4974 | <th class="line-num"><%= line.nb_line_left %></th> | ||
<td class="line-code <%= line.type_diff_left %>"> | ||||
|
r7751 | <pre><%= Redmine::CodesetUtil.to_utf8_by_setting(line.html_line_left) %></pre> | ||
|
r1501 | </td> | ||
|
r4974 | <th class="line-num"><%= line.nb_line_right %></th> | ||
<td class="line-code <%= line.type_diff_right %>"> | ||||
|
r7751 | <pre><%= Redmine::CodesetUtil.to_utf8_by_setting(line.html_line_right) %></pre> | ||
|
r1501 | </td> | ||
</tr> | ||||
<% end -%> | ||||
</tbody> | ||||
</table> | ||||
<% else -%> | ||||
|
r4974 | <table class="filecontent"> | ||
|
r1501 | <thead> | ||
|
r7751 | <tr> | ||
<th colspan="3" class="filename"> | ||||
<%= h(Redmine::CodesetUtil.to_utf8_by_setting(table_file.file_name)) %> | ||||
</th> | ||||
</tr> | ||||
|
r1501 | </thead> | ||
<tbody> | ||||
|
r4974 | <% table_file.each_line do |spacing, line| %> | ||
<% if spacing -%> | ||||
|
r1509 | <tr class="spacing"> | ||
|
r4974 | <th class="line-num">...</th><th class="line-num">...</th><td></td> | ||
|
r1509 | </tr> | ||
|
r1501 | <% end -%> | ||
<tr> | ||||
|
r4974 | <th class="line-num"><%= line.nb_line_left %></th> | ||
<th class="line-num"><%= line.nb_line_right %></th> | ||||
<td class="line-code <%= line.type_diff %>"> | ||||
|
r7751 | <pre><%= Redmine::CodesetUtil.to_utf8_by_setting(line.html_line) %></pre> | ||
|
r1501 | </td> | ||
</tr> | ||||
<% end -%> | ||||
</tbody> | ||||
</table> | ||||
<% end -%> | ||||
</div> | ||||
<% end -%> | ||||
|
r2110 | |||
<%= l(:text_diff_truncated) if diff.truncated? %> | ||||