2008-12-07 18:21:40 +03: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-08-02 16:55:55 +04:00
|
|
|
<tr><th colspan="4" class="filename"><%=h(to_utf8(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 %>">
|
|
|
|
<pre><%=to_utf8 line.html_line_left %></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 %>">
|
|
|
|
<pre><%=to_utf8 line.html_line_right %></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-08-02 16:55:55 +04:00
|
|
|
<tr><th colspan="3" class="filename"><%=h(to_utf8(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 %>">
|
|
|
|
<pre><%=to_utf8 line.html_line %></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? %>
|