##// END OF EJS Templates
code layout clean up app/views/repositories/diff.html.erb...
Toshi MARUYAMA -
r7739:700c6de3db1b
parent child
Show More
@@ -1,23 +1,28
1 <h2><%= l(:label_revision) %> <%= @diff_format_revisions %> <%=h @path %></h2>
1 <h2><%= l(:label_revision) %> <%= @diff_format_revisions %> <%=h @path %></h2>
2
2
3 <!-- Choose view type -->
3 <!-- Choose view type -->
4 <% form_tag({:path => to_path_param(@path)}, :method => 'get') do %>
4 <% form_tag({:path => to_path_param(@path)}, :method => 'get') do %>
5 <%= hidden_field_tag('rev', params[:rev]) if params[:rev] %>
5 <%= hidden_field_tag('rev', params[:rev]) if params[:rev] %>
6 <%= hidden_field_tag('rev_to', params[:rev_to]) if params[:rev_to] %>
6 <%= hidden_field_tag('rev_to', params[:rev_to]) if params[:rev_to] %>
7 <p><label><%= l(:label_view_diff) %></label>
7 <p>
8 <%= select_tag 'type', options_for_select([[l(:label_diff_inline), "inline"], [l(:label_diff_side_by_side), "sbs"]], @diff_type), :onchange => "if (this.value != '') {this.form.submit()}" %></p>
8 <label><%= l(:label_view_diff) %></label>
9 <%= select_tag 'type',
10 options_for_select(
11 [[l(:label_diff_inline), "inline"], [l(:label_diff_side_by_side), "sbs"]], @diff_type),
12 :onchange => "if (this.value != '') {this.form.submit()}" %>
13 </p>
9 <% end %>
14 <% end %>
10
15
11 <% cache(@cache_key) do -%>
16 <% cache(@cache_key) do -%>
12 <%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type} %>
17 <%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type} %>
13 <% end -%>
18 <% end -%>
14
19
15 <% other_formats_links do |f| %>
20 <% other_formats_links do |f| %>
16 <%= f.link_to 'Diff', :url => params, :caption => 'Unified diff' %>
21 <%= f.link_to 'Diff', :url => params, :caption => 'Unified diff' %>
17 <% end %>
22 <% end %>
18
23
19 <% html_title(with_leading_slash(@path), 'Diff') -%>
24 <% html_title(with_leading_slash(@path), 'Diff') -%>
20
25
21 <% content_for :header_tags do %>
26 <% content_for :header_tags do %>
22 <%= stylesheet_link_tag "scm" %>
27 <%= stylesheet_link_tag "scm" %>
23 <% end %>
28 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now