2011-11-20 13:44:58 +04:00
|
|
|
<% diff = Redmine::UnifiedDiff.new(
|
|
|
|
diff, :type => diff_type,
|
|
|
|
:max_lines => Setting.diff_max_lines_displayed.to_i) -%>
|
2011-03-11 23:23:29 +03:00
|
|
|
|
2008-12-07 18:21:40 +03:00
|
|
|
<% diff.each do |table_file| -%>
|
2008-06-08 22:10:49 +04:00
|
|
|
<div class="autoscroll">
|
2011-03-11 23:23:29 +03:00
|
|
|
<% if diff.diff_type == 'sbs' -%>
|
2010-03-14 16:22:50 +03:00
|
|
|
<table class="filecontent">
|
2008-06-08 22:10:49 +04:00
|
|
|
<thead>
|
2011-11-20 16:04:11 +04:00
|
|
|
<tr>
|
|
|
|
<th colspan="4" class="filename">
|
|
|
|
<%= h(Redmine::CodesetUtil.to_utf8_by_setting(table_file.file_name)) %>
|
|
|
|
</th>
|
|
|
|
</tr>
|
2008-06-08 22:10:49 +04:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
2011-03-11 23:23:29 +03:00
|
|
|
<% table_file.each_line do |spacing, line| -%>
|
|
|
|
<% if spacing -%>
|
2008-06-09 23:15:40 +04:00
|
|
|
<tr class="spacing">
|
2011-03-11 23:23:29 +03:00
|
|
|
<th class="line-num">...</th><td></td><th class="line-num">...</th><td></td>
|
|
|
|
</tr>
|
2008-06-08 22:10:49 +04:00
|
|
|
<% end -%>
|
|
|
|
<tr>
|
2011-03-11 23:23:29 +03:00
|
|
|
<th class="line-num"><%= line.nb_line_left %></th>
|
|
|
|
<td class="line-code <%= line.type_diff_left %>">
|
2012-02-22 07:38:08 +04:00
|
|
|
<pre><%= Redmine::CodesetUtil.to_utf8_by_setting(line.html_line_left).html_safe %></pre>
|
2008-06-08 22:10:49 +04:00
|
|
|
</td>
|
2011-03-11 23:23:29 +03:00
|
|
|
<th class="line-num"><%= line.nb_line_right %></th>
|
|
|
|
<td class="line-code <%= line.type_diff_right %>">
|
2012-02-22 07:38:08 +04:00
|
|
|
<pre><%= Redmine::CodesetUtil.to_utf8_by_setting(line.html_line_right).html_safe %></pre>
|
2008-06-08 22:10:49 +04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end -%>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<% else -%>
|
2011-03-11 23:23:29 +03:00
|
|
|
<table class="filecontent">
|
2008-06-08 22:10:49 +04:00
|
|
|
<thead>
|
2011-11-20 16:04:11 +04:00
|
|
|
<tr>
|
|
|
|
<th colspan="3" class="filename">
|
|
|
|
<%= h(Redmine::CodesetUtil.to_utf8_by_setting(table_file.file_name)) %>
|
|
|
|
</th>
|
|
|
|
</tr>
|
2008-06-08 22:10:49 +04:00
|
|
|
</thead>
|
|
|
|
<tbody>
|
2011-03-11 23:23:29 +03:00
|
|
|
<% table_file.each_line do |spacing, line| %>
|
|
|
|
<% if spacing -%>
|
2008-06-09 23:15:40 +04:00
|
|
|
<tr class="spacing">
|
2011-03-11 23:23:29 +03:00
|
|
|
<th class="line-num">...</th><th class="line-num">...</th><td></td>
|
2008-06-09 23:15:40 +04:00
|
|
|
</tr>
|
2008-06-08 22:10:49 +04:00
|
|
|
<% end -%>
|
|
|
|
<tr>
|
2011-03-11 23:23:29 +03:00
|
|
|
<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 %>">
|
2012-02-22 07:38:08 +04:00
|
|
|
<pre><%= Redmine::CodesetUtil.to_utf8_by_setting(line.html_line).html_safe %></pre>
|
2008-06-08 22:10:49 +04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end -%>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<% end -%>
|
|
|
|
</div>
|
|
|
|
<% end -%>
|
2008-12-07 18:21:40 +03:00
|
|
|
|
|
|
|
<%= l(:text_diff_truncated) if diff.truncated? %>
|