2007-03-18 18:48:05 +03:00
|
|
|
<h2><%= l(:label_revision) %> <%= @rev %>: <%= @path.gsub(/^.*\//, '') %></h2>
|
2007-03-12 20:59:02 +03:00
|
|
|
|
2007-03-29 22:14:59 +04:00
|
|
|
<!-- Choose view type -->
|
|
|
|
<% form_tag({ :controller => 'repositories', :action => 'diff'}, :method => 'get') do %>
|
|
|
|
<% params.each do |k, p| %>
|
|
|
|
<% if k != "type" %>
|
|
|
|
<%= hidden_field_tag(k,p) %>
|
|
|
|
<% end %>
|
|
|
|
<% end %>
|
|
|
|
<p><label><%= l(:label_view_diff) %></label>
|
2007-05-02 00:56:19 +04:00
|
|
|
<%= select_tag 'type', options_for_select([[l(:label_diff_inline), "inline"], [l(:label_diff_side_by_side), "sbs"]], params[:type]), :onchange => "if (this.value != '') {this.form.submit()}" %></p>
|
2007-03-29 22:14:59 +04:00
|
|
|
<% end %>
|
2007-05-02 00:56:19 +04:00
|
|
|
|
2007-09-22 17:17:49 +04:00
|
|
|
<div class="autoscroll">
|
2007-05-02 00:56:19 +04:00
|
|
|
<% cache(@cache_key) do %>
|
2007-03-29 22:14:59 +04:00
|
|
|
<% @diff.each do |table_file| %>
|
2007-05-02 00:56:19 +04:00
|
|
|
<% if @diff_type == 'sbs' %>
|
2007-09-22 17:17:49 +04:00
|
|
|
<table class="filecontent CodeRay">
|
2007-03-29 22:14:59 +04:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2007-09-22 17:17:49 +04:00
|
|
|
<th colspan="4" class="filename">
|
2007-05-02 00:56:19 +04:00
|
|
|
<%= table_file.file_name %>
|
2007-03-29 22:14:59 +04:00
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
2007-05-02 00:56:19 +04:00
|
|
|
<th colspan="2">@<%= @rev %></th>
|
|
|
|
<th colspan="2">@<%= @rev_to %></th>
|
2007-03-29 22:14:59 +04:00
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<% table_file.keys.sort.each do |key| %>
|
|
|
|
<tr>
|
|
|
|
<th class="line-num">
|
|
|
|
<%= table_file[key].nb_line_left %>
|
|
|
|
</th>
|
|
|
|
<td class="line-code <%= table_file[key].type_diff_left %>">
|
2007-08-16 00:20:18 +04:00
|
|
|
<pre><%= table_file[key].line_left %></pre>
|
2007-03-29 22:14:59 +04:00
|
|
|
</td>
|
|
|
|
<th class="line-num">
|
|
|
|
<%= table_file[key].nb_line_right %>
|
|
|
|
</th>
|
|
|
|
<td class="line-code <%= table_file[key].type_diff_right %>">
|
2007-08-16 00:20:18 +04:00
|
|
|
<pre><%= table_file[key].line_right %></pre>
|
2007-03-29 22:14:59 +04:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2007-03-12 20:59:02 +03:00
|
|
|
|
2007-03-29 22:14:59 +04:00
|
|
|
<% else %>
|
2007-09-22 17:17:49 +04:00
|
|
|
<table class="filecontent CodeRay">
|
2007-03-29 22:14:59 +04:00
|
|
|
<thead>
|
|
|
|
<tr>
|
2007-09-22 17:17:49 +04:00
|
|
|
<th colspan="3" class="filename">
|
2007-05-02 00:56:19 +04:00
|
|
|
<%= table_file.file_name %>
|
2007-03-29 22:14:59 +04:00
|
|
|
</th>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<th>@<%= @rev %></th>
|
|
|
|
<th>@<%= @rev_to %></th>
|
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tbody>
|
|
|
|
<% table_file.keys.sort.each do |key, line| %>
|
|
|
|
<tr>
|
|
|
|
<th class="line-num">
|
|
|
|
<%= table_file[key].nb_line_left %>
|
|
|
|
</th>
|
|
|
|
<th class="line-num">
|
|
|
|
<%= table_file[key].nb_line_right %>
|
|
|
|
</th>
|
|
|
|
<% if table_file[key].line_left.empty? %>
|
|
|
|
<td class="line-code <%= table_file[key].type_diff_right %>">
|
2007-08-16 00:20:18 +04:00
|
|
|
<pre><%= table_file[key].line_right %></pre>
|
2007-03-29 22:14:59 +04:00
|
|
|
</td>
|
|
|
|
<% else %>
|
|
|
|
<td class="line-code <%= table_file[key].type_diff_left %>">
|
2007-08-16 00:20:18 +04:00
|
|
|
<pre><%= table_file[key].line_left %></pre>
|
2007-03-29 22:14:59 +04:00
|
|
|
</td>
|
|
|
|
<% end %>
|
|
|
|
</tr>
|
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<% end %>
|
2007-03-12 20:59:02 +03:00
|
|
|
<% end %>
|
2007-05-02 00:56:19 +04:00
|
|
|
<% end %>
|
2007-09-22 17:17:49 +04:00
|
|
|
</div>
|
2007-03-12 20:59:02 +03:00
|
|
|
|
|
|
|
<% content_for :header_tags do %>
|
|
|
|
<%= stylesheet_link_tag "scm" %>
|
|
|
|
<% end %>
|