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