2007-03-12 20:59:02 +03:00
|
|
|
<div class="contextual">
|
|
|
|
<%= link_to(l(:label_page_index), {:action => 'special', :page => 'Page_index'}, :class => 'icon icon-index') %>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<h2><%= @page.pretty_title %></h2>
|
|
|
|
|
|
|
|
<h3><%= l(:label_history) %></h3>
|
|
|
|
|
2007-07-14 15:25:03 +04:00
|
|
|
<% form_tag({:action => "diff"}, :method => :get) do %>
|
2007-03-12 20:59:02 +03:00
|
|
|
<table class="list">
|
|
|
|
<thead><tr>
|
|
|
|
<th>#</th>
|
2007-07-14 15:25:03 +04:00
|
|
|
<th></th>
|
|
|
|
<th></th>
|
2007-03-12 20:59:02 +03:00
|
|
|
<th><%= l(:field_updated_on) %></th>
|
|
|
|
<th><%= l(:field_author) %></th>
|
2007-04-25 19:06:20 +04:00
|
|
|
<th><%= l(:field_comments) %></th>
|
2007-03-12 20:59:02 +03:00
|
|
|
</tr></thead>
|
|
|
|
<tbody>
|
2007-07-14 15:25:03 +04:00
|
|
|
<% show_diff = @versions.size > 1 %>
|
|
|
|
<% line_num = 1 %>
|
2007-03-12 20:59:02 +03:00
|
|
|
<% @versions.each do |ver| %>
|
|
|
|
<tr class="<%= cycle("odd", "even") %>">
|
|
|
|
<th align="center"><%= link_to ver.version, :action => 'index', :page => @page.title, :version => ver.version %></th>
|
2007-07-14 15:25:03 +04:00
|
|
|
<td align="center" width="1%"><%= radio_button_tag('version', ver.version, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('cbto-#{line_num+1}').checked=true;") if show_diff && (line_num < @versions.size) %></td>
|
|
|
|
<td align="center" width="1%"><%= radio_button_tag('version_from', ver.version, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('cb-#{line_num}').checked==true || $('version_from').value > #{ver.version}) {$('cb-#{line_num-1}').checked=true;}") if show_diff && (line_num > 1) %></td>
|
2007-03-12 20:59:02 +03:00
|
|
|
<td align="center"><%= format_time(ver.updated_on) %></td>
|
|
|
|
<td><em><%= ver.author ? ver.author.name : "anonyme" %></em></td>
|
2007-04-25 19:06:20 +04:00
|
|
|
<td><%=h ver.comments %></td>
|
2007-03-12 20:59:02 +03:00
|
|
|
</tr>
|
2007-07-14 15:25:03 +04:00
|
|
|
<% line_num += 1 %>
|
2007-03-12 20:59:02 +03:00
|
|
|
<% end %>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2007-07-14 15:25:03 +04:00
|
|
|
<%= submit_tag l(:label_view_diff), :class => 'small' %>
|
|
|
|
<%= pagination_links_full @version_pages, :page_param => :p %>
|
|
|
|
[ <%= @version_pages.current.first_item %> - <%= @version_pages.current.last_item %> / <%= @version_count %> ]
|
|
|
|
<% end %>
|