Cache Revisions
Fix config/routes.rb to make revisions cacheable. Cache revisions. Modify the history page so that it links to the current page (and diff).
This commit is contained in:
parent
73a7ceef03
commit
69bfc1028b
4 changed files with 13 additions and 4 deletions
|
@ -54,7 +54,12 @@ module ApplicationHelper
|
|||
|
||||
# Create a hyperlink to a particular revision of a Wiki page
|
||||
def link_to_revision(page, revision_number, text = nil, mode = nil, html_options = {})
|
||||
link_to(
|
||||
revision_number == page.revisions.length ?
|
||||
link_to(
|
||||
text || page.plain_name,
|
||||
{:web => @web.address, :action => 'show', :id => page.name,
|
||||
:mode => mode}, html_options) :
|
||||
link_to(
|
||||
text || page.plain_name + "(rev # #{revision_number})",
|
||||
{:web => @web.address, :action => 'revision', :id => page.name,
|
||||
:rev => revision_number, :mode => mode}, html_options)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue