To check out this repository please hg clone the following URL, or open the URL using EasyMercurial or your preferred Mercurial client.

Statistics Download as Zip
| Branch: | Tag: | Revision:

root / app / views / wiki / history.html.erb @ 1591:63650ae64bf2

History | View | Annotate | Download (1.9 KB)

1
<%= wiki_page_breadcrumb(@page) %>
2

    
3
<%= title [@page.pretty_title, project_wiki_page_path(@page.project, @page.title, :version => nil)], l(:label_history) %>
4

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