diff .svn/pristine/97/97e5af17b0ff620e9c12200e0ea40a146395b3bd.svn-base @ 1298:4f746d8966dd redmine_2.3_integration

Merge from redmine-2.3 branch to create new branch redmine-2.3-integration
author Chris Cannam
date Fri, 14 Jun 2013 09:28:30 +0100
parents 622f24f53b42
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/.svn/pristine/97/97e5af17b0ff620e9c12200e0ea40a146395b3bd.svn-base	Fri Jun 14 09:28:30 2013 +0100
@@ -0,0 +1,68 @@
+<% diff = Redmine::UnifiedDiff.new(
+            diff, :type => diff_type,
+            :max_lines => Setting.diff_max_lines_displayed.to_i,
+            :style => diff_style) -%>
+
+<% diff.each do |table_file| -%>
+<div class="autoscroll">
+<% if diff.diff_type == 'sbs' -%>
+<table class="filecontent">
+<thead>
+<tr>
+  <th colspan="4" class="filename">
+    <%= table_file.file_name %>
+  </th>
+</tr>
+</thead>
+<tbody>
+<% table_file.each_line do |spacing, line| -%>
+<% if spacing -%>
+<tr class="spacing">
+  <th class="line-num">...</th><td></td><th class="line-num">...</th><td></td>
+</tr>
+<% end -%>
+<tr>
+  <th class="line-num"><%= line.nb_line_left %></th>
+  <td class="line-code <%= line.type_diff_left %>">
+    <pre><%= line.html_line_left.html_safe %></pre>
+  </td>
+  <th class="line-num"><%= line.nb_line_right %></th>
+  <td class="line-code <%= line.type_diff_right %>">
+    <pre><%= line.html_line_right.html_safe %></pre>
+  </td>
+</tr>
+<% end -%>
+</tbody>
+</table>
+
+<% else -%>
+<table class="filecontent">
+<thead>
+  <tr>
+    <th colspan="3" class="filename">
+      <%= table_file.file_name %>
+    </th>
+  </tr>
+</thead>
+<tbody>
+<% table_file.each_line do |spacing, line| %>
+<% if spacing -%>
+<tr class="spacing">
+  <th class="line-num">...</th><th class="line-num">...</th><td></td>
+</tr>
+<% end -%>
+<tr>
+  <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><%= line.html_line.html_safe %></pre>
+  </td>
+</tr>
+<% end -%>
+</tbody>
+</table>
+<% end -%>
+</div>
+<% end -%>
+
+<%= l(:text_diff_truncated) if diff.truncated? %>