Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

_revisions.html.erb 2.6KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <% show_diff = revisions.size > 1 && User.current.allowed_to?(:browse_repository, @repository.project) %>
  2. <% if show_diff %>
  3. <p>
  4. <%= submit_tag(l(:label_view_diff), :name => nil) %>
  5. </p>
  6. <% end %>
  7. <div class="autoscroll">
  8. <% show_revision_graph = ( @repository.supports_revision_graph? && path.blank? ) %>
  9. <%= if show_revision_graph && revisions && revisions.any?
  10. indexed_commits, graph_space = index_commits(revisions, @repository.branches) do |scmid|
  11. url_for(
  12. :controller => 'repositories',
  13. :action => 'revision',
  14. :id => project,
  15. :repository_id => @repository.identifier_param,
  16. :rev => scmid)
  17. end
  18. render :partial => 'revision_graph',
  19. :locals => {
  20. :commits => indexed_commits,
  21. :space => graph_space
  22. }
  23. end %>
  24. <%= form_tag(
  25. {:controller => 'repositories', :action => 'diff', :id => project,
  26. :repository_id => @repository.identifier_param, :path => to_path_param(path)},
  27. :method => :get
  28. ) do %>
  29. <table class="list changesets">
  30. <thead><tr>
  31. <th>#</th>
  32. <th></th>
  33. <th></th>
  34. <th><%= l(:label_date) %></th>
  35. <th><%= l(:field_author) %></th>
  36. <th><%= l(:field_comments) %></th>
  37. </tr></thead>
  38. <tbody>
  39. <% line_num = 1 %>
  40. <% revisions.each do |changeset| %>
  41. <tr class="changeset">
  42. <% id_style = (show_revision_graph ? "padding-left:#{(graph_space + 1) * 20}px" : nil) %>
  43. <%= content_tag(:td, :class => 'id', :style => id_style) do %>
  44. <%= link_to_revision(changeset, @repository) %>
  45. <% end %>
  46. <td class="checkbox"><%= radio_button_tag('rev', changeset.identifier, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').prop('checked',true);") if show_diff && (line_num < revisions.size) %></td>
  47. <td class="checkbox"><%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('#cb-#{line_num}').prop('checked')) {$('#cb-#{line_num-1}').prop('checked',true);}") if show_diff && (line_num > 1) %></td>
  48. <td class="committed_on"><%= format_time(changeset.committed_on) %></td>
  49. <td class="author"><%= changeset.user.blank? ? changeset.author.to_s.truncate(30) : link_to_user(changeset.user) %></td>
  50. <td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments), :formatting => Setting.commit_logs_formatting?) %></td>
  51. </tr>
  52. <% line_num += 1 %>
  53. <% end %>
  54. </tbody>
  55. </table>
  56. <% end %>
  57. </div>
  58. <% if show_diff %>
  59. <p>
  60. <%= submit_tag(l(:label_view_diff), :name => nil) %>
  61. </p>
  62. <% end %>