To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.
root / .svn / pristine / 3c / 3c182a61315731239b388b13cfd0c9e853524d29.svn-base @ 1298:4f746d8966dd
History | View | Annotate | Download (1.8 KB)
| 1 |
<% diff = Redmine::UnifiedDiff.new( |
|---|---|
| 2 |
diff, :type => diff_type, |
| 3 |
:max_lines => Setting.diff_max_lines_displayed.to_i, |
| 4 |
:style => diff_style) -%> |
| 5 |
|
| 6 |
<% diff.each do |table_file| -%> |
| 7 |
<div class="autoscroll"> |
| 8 |
<% if diff.diff_type == 'sbs' -%> |
| 9 |
<table class="filecontent"> |
| 10 |
<thead> |
| 11 |
<tr> |
| 12 |
<th colspan="4" class="filename"> |
| 13 |
<%= h(Redmine::CodesetUtil.to_utf8_by_setting(table_file.file_name)) %> |
| 14 |
</th> |
| 15 |
</tr> |
| 16 |
</thead> |
| 17 |
<tbody> |
| 18 |
<% table_file.each_line do |spacing, line| -%> |
| 19 |
<% if spacing -%> |
| 20 |
<tr class="spacing"> |
| 21 |
<th class="line-num">...</th><td></td><th class="line-num">...</th><td></td> |
| 22 |
</tr> |
| 23 |
<% end -%> |
| 24 |
<tr> |
| 25 |
<th class="line-num"><%= line.nb_line_left %></th> |
| 26 |
<td class="line-code <%= line.type_diff_left %>"> |
| 27 |
<pre><%= Redmine::CodesetUtil.to_utf8_by_setting(line.html_line_left).html_safe %></pre> |
| 28 |
</td> |
| 29 |
<th class="line-num"><%= line.nb_line_right %></th> |
| 30 |
<td class="line-code <%= line.type_diff_right %>"> |
| 31 |
<pre><%= Redmine::CodesetUtil.to_utf8_by_setting(line.html_line_right).html_safe %></pre> |
| 32 |
</td> |
| 33 |
</tr> |
| 34 |
<% end -%> |
| 35 |
</tbody> |
| 36 |
</table> |
| 37 |
|
| 38 |
<% else -%> |
| 39 |
<table class="filecontent"> |
| 40 |
<thead> |
| 41 |
<tr> |
| 42 |
<th colspan="3" class="filename"> |
| 43 |
<%= h(Redmine::CodesetUtil.to_utf8_by_setting(table_file.file_name)) %> |
| 44 |
</th> |
| 45 |
</tr> |
| 46 |
</thead> |
| 47 |
<tbody> |
| 48 |
<% table_file.each_line do |spacing, line| %> |
| 49 |
<% if spacing -%> |
| 50 |
<tr class="spacing"> |
| 51 |
<th class="line-num">...</th><th class="line-num">...</th><td></td> |
| 52 |
</tr> |
| 53 |
<% end -%> |
| 54 |
<tr> |
| 55 |
<th class="line-num"><%= line.nb_line_left %></th> |
| 56 |
<th class="line-num"><%= line.nb_line_right %></th> |
| 57 |
<td class="line-code <%= line.type_diff %>"> |
| 58 |
<pre><%= Redmine::CodesetUtil.to_utf8_by_setting(line.html_line).html_safe %></pre> |
| 59 |
</td> |
| 60 |
</tr> |
| 61 |
<% end -%> |
| 62 |
</tbody> |
| 63 |
</table> |
| 64 |
<% end -%> |
| 65 |
</div> |
| 66 |
<% end -%> |
| 67 |
|
| 68 |
<%= l(:text_diff_truncated) if diff.truncated? %> |