##// END OF EJS Templates
Use radio buttons instead of a select....
Jean-Philippe Lang -
r10243:3586e44c1d32
parent child
Show More
@@ -1,28 +1,26
1 1 <h2><%= l(:label_revision) %> <%= @diff_format_revisions %> <%=h @path %></h2>
2 2
3 3 <!-- Choose view type -->
4 4 <%= form_tag({:path => to_path_param(@path)}, :method => 'get') do %>
5 5 <%= hidden_field_tag('rev', params[:rev]) if params[:rev] %>
6 6 <%= hidden_field_tag('rev_to', params[:rev_to]) if params[:rev_to] %>
7 7 <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()}" %>
8 <%= l(:label_view_diff) %>:
9 <label><%= radio_button_tag 'type', 'inline', @diff_type != 'sbs', :onchange => "this.form.submit()" %> <%= l(:label_diff_inline) %></label>
10 <label><%= radio_button_tag 'type', 'sbs', @diff_type == 'sbs', :onchange => "this.form.submit()" %> <%= l(:label_diff_side_by_side) %></label>
13 11 </p>
14 12 <% end %>
15 13
16 14 <% cache(@cache_key) do -%>
17 15 <%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type, :diff_style => @repository.class.scm_name} %>
18 16 <% end -%>
19 17
20 18 <% other_formats_links do |f| %>
21 19 <%= f.link_to 'Diff', :url => params, :caption => 'Unified diff' %>
22 20 <% end %>
23 21
24 22 <% html_title(with_leading_slash(@path), 'Diff') -%>
25 23
26 24 <% content_for :header_tags do %>
27 25 <%= stylesheet_link_tag "scm" %>
28 26 <% end %>
General Comments 0
You need to be logged in to leave comments. Login now