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.

history.html.erb 1.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <%= wiki_page_breadcrumb(@page) %>
  2. <%= title [@page.pretty_title, project_wiki_page_path(@page.project, @page.title, :version => nil)], l(:label_history) %>
  3. <%= form_tag({:controller => 'wiki', :action => 'diff',
  4. :project_id => @page.project, :id => @page.title},
  5. :method => :get) do %>
  6. <% show_diff = @versions.size > 1 %>
  7. <% if show_diff %>
  8. <p><%= submit_tag l(:label_view_diff) %></p>
  9. <% end %>
  10. <table class="list wiki-page-versions">
  11. <thead><tr>
  12. <th>#</th>
  13. <th></th>
  14. <th></th>
  15. <th><%= l(:field_updated_on) %></th>
  16. <th><%= l(:field_author) %></th>
  17. <th><%= l(:field_comments) %></th>
  18. <th></th>
  19. </tr></thead>
  20. <tbody>
  21. <% line_num = 1 %>
  22. <% @versions.each do |ver| %>
  23. <tr class="wiki-page-version">
  24. <td class="id"><%= link_to ver.version, :action => 'show', :id => @page.title, :project_id => @page.project, :version => ver.version %></td>
  25. <td class="checkbox"><%= radio_button_tag('version', ver.version, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').prop('checked', true);") if show_diff && (line_num < @versions.size) %></td>
  26. <td class="checkbox"><%= radio_button_tag('version_from', ver.version, (line_num==2), :id => "cbto-#{line_num}") if show_diff && (line_num > 1) %></td>
  27. <td class="updated_on"><%= format_time(ver.updated_on) %></td>
  28. <td class="author"><%= link_to_user ver.author %></td>
  29. <td class="comments"><%= ver.comments %></td>
  30. <td class="buttons">
  31. <%= link_to l(:button_annotate), :action => 'annotate', :id => @page.title, :version => ver.version %>
  32. <%= delete_link wiki_page_path(@page, :version => ver.version) if User.current.allowed_to?(:delete_wiki_pages, @page.project) && @version_count > 1 %>
  33. </td>
  34. </tr>
  35. <% line_num += 1 %>
  36. <% end %>
  37. </tbody>
  38. </table>
  39. <% if show_diff %>
  40. <p><%= submit_tag l(:label_view_diff) %></p>
  41. <% end %>
  42. <span class="pagination"><%= pagination_links_full @version_pages, @version_count %></span>
  43. <% end %>