@@ -1,67 +1,67 | |||||
1 | <% diff = Redmine::UnifiedDiff.new( |
|
1 | <% diff = Redmine::UnifiedDiff.new( | |
2 | diff, :type => diff_type, |
|
2 | diff, :type => diff_type, | |
3 | :max_lines => Setting.diff_max_lines_displayed.to_i) -%> |
|
3 | :max_lines => Setting.diff_max_lines_displayed.to_i) -%> | |
4 |
|
4 | |||
5 | <% diff.each do |table_file| -%> |
|
5 | <% diff.each do |table_file| -%> | |
6 | <div class="autoscroll"> |
|
6 | <div class="autoscroll"> | |
7 | <% if diff.diff_type == 'sbs' -%> |
|
7 | <% if diff.diff_type == 'sbs' -%> | |
8 | <table class="filecontent"> |
|
8 | <table class="filecontent"> | |
9 | <thead> |
|
9 | <thead> | |
10 | <tr> |
|
10 | <tr> | |
11 | <th colspan="4" class="filename"> |
|
11 | <th colspan="4" class="filename"> | |
12 | <%= h(Redmine::CodesetUtil.to_utf8_by_setting(table_file.file_name)) %> |
|
12 | <%= h(Redmine::CodesetUtil.to_utf8_by_setting(table_file.file_name)) %> | |
13 | </th> |
|
13 | </th> | |
14 | </tr> |
|
14 | </tr> | |
15 | </thead> |
|
15 | </thead> | |
16 | <tbody> |
|
16 | <tbody> | |
17 | <% table_file.each_line do |spacing, line| -%> |
|
17 | <% table_file.each_line do |spacing, line| -%> | |
18 | <% if spacing -%> |
|
18 | <% if spacing -%> | |
19 | <tr class="spacing"> |
|
19 | <tr class="spacing"> | |
20 | <th class="line-num">...</th><td></td><th class="line-num">...</th><td></td> |
|
20 | <th class="line-num">...</th><td></td><th class="line-num">...</th><td></td> | |
21 | </tr> |
|
21 | </tr> | |
22 | <% end -%> |
|
22 | <% end -%> | |
23 | <tr> |
|
23 | <tr> | |
24 | <th class="line-num"><%= line.nb_line_left %></th> |
|
24 | <th class="line-num"><%= line.nb_line_left %></th> | |
25 | <td class="line-code <%= line.type_diff_left %>"> |
|
25 | <td class="line-code <%= line.type_diff_left %>"> | |
26 | <pre><%= Redmine::CodesetUtil.to_utf8_by_setting(line.html_line_left) %></pre> |
|
26 | <pre><%= Redmine::CodesetUtil.to_utf8_by_setting(line.html_line_left).html_safe %></pre> | |
27 | </td> |
|
27 | </td> | |
28 | <th class="line-num"><%= line.nb_line_right %></th> |
|
28 | <th class="line-num"><%= line.nb_line_right %></th> | |
29 | <td class="line-code <%= line.type_diff_right %>"> |
|
29 | <td class="line-code <%= line.type_diff_right %>"> | |
30 | <pre><%= Redmine::CodesetUtil.to_utf8_by_setting(line.html_line_right) %></pre> |
|
30 | <pre><%= Redmine::CodesetUtil.to_utf8_by_setting(line.html_line_right).html_safe %></pre> | |
31 | </td> |
|
31 | </td> | |
32 | </tr> |
|
32 | </tr> | |
33 | <% end -%> |
|
33 | <% end -%> | |
34 | </tbody> |
|
34 | </tbody> | |
35 | </table> |
|
35 | </table> | |
36 |
|
36 | |||
37 | <% else -%> |
|
37 | <% else -%> | |
38 | <table class="filecontent"> |
|
38 | <table class="filecontent"> | |
39 | <thead> |
|
39 | <thead> | |
40 | <tr> |
|
40 | <tr> | |
41 | <th colspan="3" class="filename"> |
|
41 | <th colspan="3" class="filename"> | |
42 | <%= h(Redmine::CodesetUtil.to_utf8_by_setting(table_file.file_name)) %> |
|
42 | <%= h(Redmine::CodesetUtil.to_utf8_by_setting(table_file.file_name)) %> | |
43 | </th> |
|
43 | </th> | |
44 | </tr> |
|
44 | </tr> | |
45 | </thead> |
|
45 | </thead> | |
46 | <tbody> |
|
46 | <tbody> | |
47 | <% table_file.each_line do |spacing, line| %> |
|
47 | <% table_file.each_line do |spacing, line| %> | |
48 | <% if spacing -%> |
|
48 | <% if spacing -%> | |
49 | <tr class="spacing"> |
|
49 | <tr class="spacing"> | |
50 | <th class="line-num">...</th><th class="line-num">...</th><td></td> |
|
50 | <th class="line-num">...</th><th class="line-num">...</th><td></td> | |
51 | </tr> |
|
51 | </tr> | |
52 | <% end -%> |
|
52 | <% end -%> | |
53 | <tr> |
|
53 | <tr> | |
54 | <th class="line-num"><%= line.nb_line_left %></th> |
|
54 | <th class="line-num"><%= line.nb_line_left %></th> | |
55 | <th class="line-num"><%= line.nb_line_right %></th> |
|
55 | <th class="line-num"><%= line.nb_line_right %></th> | |
56 | <td class="line-code <%= line.type_diff %>"> |
|
56 | <td class="line-code <%= line.type_diff %>"> | |
57 | <pre><%= Redmine::CodesetUtil.to_utf8_by_setting(line.html_line) %></pre> |
|
57 | <pre><%= Redmine::CodesetUtil.to_utf8_by_setting(line.html_line).html_safe %></pre> | |
58 | </td> |
|
58 | </td> | |
59 | </tr> |
|
59 | </tr> | |
60 | <% end -%> |
|
60 | <% end -%> | |
61 | </tbody> |
|
61 | </tbody> | |
62 | </table> |
|
62 | </table> | |
63 | <% end -%> |
|
63 | <% end -%> | |
64 | </div> |
|
64 | </div> | |
65 | <% end -%> |
|
65 | <% end -%> | |
66 |
|
66 | |||
67 | <%= l(:text_diff_truncated) if diff.truncated? %> |
|
67 | <%= l(:text_diff_truncated) if diff.truncated? %> |
General Comments 0
You need to be logged in to leave comments.
Login now