2006-03-11 23:10:32 +01:00
|
|
|
<%
|
|
|
|
@title = "#{@page.plain_name} (Rev ##{@revision_number}#{@show_diff ? ', changes' : ''})"
|
|
|
|
%>
|
2005-01-24 19:52:04 +01:00
|
|
|
|
|
|
|
|
2006-03-11 23:10:32 +01:00
|
|
|
<div id="revision">
|
|
|
|
<%= @show_diff ? @renderer.display_diff : @renderer.display_content %>
|
2005-01-24 19:52:04 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="byline">
|
2005-08-15 01:35:10 +02:00
|
|
|
<%= "Revision from #{format_date(@revision.revised_at)} by" %>
|
2005-02-13 19:53:49 +01:00
|
|
|
<%= link_to_page @revision.author %>
|
2005-01-24 19:52:04 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="navigation">
|
|
|
|
|
2005-08-15 00:26:54 +02:00
|
|
|
<% if @revision_number < @page.revisions.length - 1 %>
|
|
|
|
<% if @revision_number < @page.revisions.length - 2 %>
|
2005-02-19 00:19:42 +01:00
|
|
|
<%= link_to('Forward in time',
|
2005-02-19 03:45:28 +01:00
|
|
|
{:web => @web.address, :action => 'revision', :id => @page.name,
|
2005-08-15 00:26:54 +02:00
|
|
|
:rev => @revision_number + 1},
|
2005-05-18 04:07:48 +02:00
|
|
|
{:class => 'navlink', :name => 'to_next_revision'})
|
2005-02-19 00:19:42 +01:00
|
|
|
%>
|
2005-01-24 19:52:04 +01:00
|
|
|
<% else %>
|
2005-02-19 00:19:42 +01:00
|
|
|
<%= link_to('Forward in time',
|
2005-02-19 03:45:28 +01:00
|
|
|
{:web => @web.address, :action => 'show', :id => @page.name},
|
2005-05-18 04:07:48 +02:00
|
|
|
{:class => 'navlink', :name => 'to_next_revision'})
|
2005-02-19 00:19:42 +01:00
|
|
|
%>
|
2005-01-24 19:52:04 +01:00
|
|
|
<% end %>
|
2005-08-15 00:26:54 +02:00
|
|
|
<small>(<%= @revision.page.revisions.length - @revision_number - 1 %> more)</small>
|
2005-01-24 19:52:04 +01:00
|
|
|
<% end %>
|
|
|
|
|
2005-08-15 00:26:54 +02:00
|
|
|
<% if @revision_number > 0 && @revision_number < @page.revisions.size - 1 %>
|
2005-01-24 19:52:04 +01:00
|
|
|
|
|
|
|
|
<% end %>
|
|
|
|
|
2005-08-15 00:26:54 +02:00
|
|
|
<% if @revision_number > 0 %>
|
2005-02-19 00:19:42 +01:00
|
|
|
<%= link_to('Back in time',
|
2005-02-19 03:45:28 +01:00
|
|
|
{:web => @web.address, :action => 'revision', :id => @page.name,
|
2005-08-15 00:26:54 +02:00
|
|
|
:rev => @revision_number - 1},
|
2005-05-18 04:07:48 +02:00
|
|
|
{:class => 'navlink', :name => 'to_previous_revision'})
|
2005-02-19 00:19:42 +01:00
|
|
|
%>
|
2005-08-15 00:26:54 +02:00
|
|
|
<small>(<%= @revision_number %> more)</small>
|
2005-01-24 19:52:04 +01:00
|
|
|
<% end %>
|
|
|
|
|
2005-02-19 00:19:42 +01:00
|
|
|
|
|
2005-02-19 03:45:28 +01:00
|
|
|
<%= link_to('See current', {:web => @web.address, :action => 'show', :id => @page.name},
|
2005-05-18 04:07:48 +02:00
|
|
|
{:class => 'navlink', :name => 'to_current_revision'})
|
2005-02-19 00:19:42 +01:00
|
|
|
%>
|
2005-01-24 19:52:04 +01:00
|
|
|
|
2005-08-15 00:26:54 +02:00
|
|
|
<% if @revision_number > 0 %>
|
2006-03-11 23:10:32 +01:00
|
|
|
|
|
|
|
|
<%= link_to(@show_diff ? 'Hide changes' : 'See changes',
|
|
|
|
{:web => @web.address, :action => 'revision', :id => @page.name,
|
|
|
|
:rev => @revision_number, :mode => (@show_diff ? nil : 'diff') },
|
|
|
|
{:class => 'navlink', :accesskey => 'C', :name => 'see_changes'})
|
|
|
|
%>
|
2005-01-24 19:52:04 +01:00
|
|
|
<% end %>
|
|
|
|
|
2005-02-19 00:19:42 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
<%= link_to('Rollback',
|
2005-08-15 00:26:54 +02:00
|
|
|
{:web => @web.address, :action => 'rollback', :id => @page.name, :rev => @revision_number},
|
2005-05-18 04:07:48 +02:00
|
|
|
{:class => 'navlink', :name => 'rollback'})
|
2005-02-19 00:19:42 +01:00
|
|
|
%>
|
2005-11-04 07:19:10 +01:00
|
|
|
|
|
|
|
<%= render :partial => 'inbound_links' %>
|
2005-01-24 19:52:04 +01:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<script language="Javascript">
|
|
|
|
function toggleChanges() {
|
|
|
|
if (document.getElementById("changes").style.display == "none") {
|
|
|
|
document.getElementById("changes").style.display = "block";
|
|
|
|
document.getElementById("revision").style.display = "none";
|
|
|
|
document.getElementById("show_changes").style.display = "none";
|
|
|
|
document.getElementById("hide_changes").style.display = "inline";
|
|
|
|
} else {
|
|
|
|
document.getElementById("changes").style.display = "none";
|
|
|
|
document.getElementById("revision").style.display = "block";
|
|
|
|
document.getElementById("show_changes").style.display = "inline";
|
|
|
|
document.getElementById("hide_changes").style.display = "none";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
</script>
|