You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

diff.html.erb 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <% if @changeset && @changeset_to.nil? %>
  2. <div class="contextual">
  3. &#171;
  4. <% unless @changeset.previous.nil? -%>
  5. <%= link_to_revision(@changeset.previous, @repository,
  6. :text => l(:label_previous), :accesskey => accesskey(:previous)) %>
  7. <% else -%>
  8. <%= l(:label_previous) %>
  9. <% end -%>
  10. |
  11. <% unless @changeset.next.nil? -%>
  12. <%= link_to_revision(@changeset.next, @repository,
  13. :text => l(:label_next), :accesskey => accesskey(:next)) %>
  14. <% else -%>
  15. <%= l(:label_next) %>
  16. <% end -%>
  17. &#187;&nbsp;
  18. <%= form_tag({:controller => 'repositories',
  19. :action => 'revision',
  20. :id => @project,
  21. :repository_id => @repository.identifier_param,
  22. :rev => nil},
  23. :method => :get) do %>
  24. <%= text_field_tag 'rev', @rev, :size => 8 %>
  25. <%= submit_tag 'OK', :name => nil %>
  26. <% end %>
  27. </div>
  28. <%= render :partial => 'changeset' %>
  29. <% else %>
  30. <h2><%= l(:label_revision) %> <%= @diff_format_revisions %> <%= @path %></h2>
  31. <% end %>
  32. <!-- Choose view type -->
  33. <%= form_tag({:action => 'diff', :id => @project,
  34. :repository_id => @repository.identifier_param,
  35. :path => to_path_param(@path), :rev=> @rev}, :method => 'get') do %>
  36. <%= hidden_field_tag('rev_to', params[:rev_to]) if params[:rev_to] %>
  37. <p>
  38. <%= l(:label_view_diff) %>:
  39. <label><%= radio_button_tag 'type', 'inline', @diff_type != 'sbs', :onchange => "this.form.submit()" %> <%= l(:label_diff_inline) %></label>
  40. <label><%= radio_button_tag 'type', 'sbs', @diff_type == 'sbs', :onchange => "this.form.submit()" %> <%= l(:label_diff_side_by_side) %></label>
  41. </p>
  42. <% end %>
  43. <% cache(@cache_key) do -%>
  44. <%= render :partial => 'common/diff', :locals => {:diff => @diff, :diff_type => @diff_type, :diff_style => @repository.class.scm_name} %>
  45. <% end -%>
  46. <% other_formats_links do |f| %>
  47. <%= f.link_to_with_query_parameters 'Diff', { path: nil }, :caption => 'Unified diff' %>
  48. <% end %>
  49. <% html_title(with_leading_slash(@path), 'Diff') -%>
  50. <% content_for :header_tags do %>
  51. <%= stylesheet_link_tag "scm" %>
  52. <% end %>