To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / app / views / common / _diff.rhtml @ 441:cbce1fd3b1b7

History | View | Annotate | Download (1.5 KB)

1 0:513646585e45 Chris
<% diff = Redmine::UnifiedDiff.new(diff, :type => diff_type, :max_lines => Setting.diff_max_lines_displayed.to_i) -%>
2 441:cbce1fd3b1b7 Chris
3 0:513646585e45 Chris
<% diff.each do |table_file| -%>
4
<div class="autoscroll">
5 441:cbce1fd3b1b7 Chris
<% if diff.diff_type == 'sbs' -%>
6 0:513646585e45 Chris
<table class="filecontent">
7
<thead>
8 119:8661b858af72 Chris
<tr><th colspan="4" class="filename"><%=to_utf8 table_file.file_name %></th></tr>
9 0:513646585e45 Chris
</thead>
10
<tbody>
11 441:cbce1fd3b1b7 Chris
<% table_file.each_line do |spacing, line| -%>
12
<% if spacing -%>
13 0:513646585e45 Chris
<tr class="spacing">
14 441:cbce1fd3b1b7 Chris
  <th class="line-num">...</th><td></td><th class="line-num">...</th><td></td>
15
</tr>
16 0:513646585e45 Chris
<% end -%>
17
<tr>
18 441:cbce1fd3b1b7 Chris
  <th class="line-num"><%= line.nb_line_left %></th>
19
  <td class="line-code <%= line.type_diff_left %>">
20
    <pre><%=to_utf8 line.html_line_left %></pre>
21 0:513646585e45 Chris
  </td>
22 441:cbce1fd3b1b7 Chris
  <th class="line-num"><%= line.nb_line_right %></th>
23
  <td class="line-code <%= line.type_diff_right %>">
24
    <pre><%=to_utf8 line.html_line_right %></pre>
25 0:513646585e45 Chris
  </td>
26
</tr>
27
<% end -%>
28
</tbody>
29
</table>
30
31
<% else -%>
32 441:cbce1fd3b1b7 Chris
<table class="filecontent">
33 0:513646585e45 Chris
<thead>
34 119:8661b858af72 Chris
<tr><th colspan="3" class="filename"><%=to_utf8 table_file.file_name %></th></tr>
35 0:513646585e45 Chris
</thead>
36
<tbody>
37 441:cbce1fd3b1b7 Chris
<% table_file.each_line do |spacing, line| %>
38
<% if spacing -%>
39 0:513646585e45 Chris
<tr class="spacing">
40 441:cbce1fd3b1b7 Chris
  <th class="line-num">...</th><th class="line-num">...</th><td></td>
41 0:513646585e45 Chris
</tr>
42
<% end -%>
43
<tr>
44 441:cbce1fd3b1b7 Chris
  <th class="line-num"><%= line.nb_line_left %></th>
45
  <th class="line-num"><%= line.nb_line_right %></th>
46
  <td class="line-code <%= line.type_diff %>">
47
    <pre><%=to_utf8 line.html_line %></pre>
48 0:513646585e45 Chris
  </td>
49
</tr>
50
<% end -%>
51
</tbody>
52
</table>
53
<% end -%>
54
</div>
55
<% end -%>
56
57
<%= l(:text_diff_truncated) if diff.truncated? %>