Added pagination on wiki page history.
git-svn-id: http://redmine.rubyforge.org/svn/trunk@571 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -94,20 +94,22 @@ module ApplicationHelper
|
||||
end
|
||||
|
||||
def pagination_links_full(paginator, options={}, html_options={})
|
||||
page_param = options.delete(:page_param) || :page
|
||||
|
||||
html = ''
|
||||
html << link_to_remote(('« ' + l(:label_previous)),
|
||||
{:update => "content", :url => options.merge(:page => paginator.current.previous)},
|
||||
{:href => url_for(:params => options.merge(:page => paginator.current.previous))}) + ' ' if paginator.current.previous
|
||||
{:update => "content", :url => options.merge(page_param => paginator.current.previous)},
|
||||
{:href => url_for(:params => options.merge(page_param => paginator.current.previous))}) + ' ' if paginator.current.previous
|
||||
|
||||
html << (pagination_links_each(paginator, options) do |n|
|
||||
link_to_remote(n.to_s,
|
||||
{:url => {:params => options.merge(:page => n)}, :update => 'content'},
|
||||
{:href => url_for(:params => options.merge(:page => n))})
|
||||
{:url => {:params => options.merge(page_param => n)}, :update => 'content'},
|
||||
{:href => url_for(:params => options.merge(page_param => n))})
|
||||
end || '')
|
||||
|
||||
html << ' ' + link_to_remote((l(:label_next) + ' »'),
|
||||
{:update => "content", :url => options.merge(:page => paginator.current.next)},
|
||||
{:href => url_for(:params => options.merge(:page => paginator.current.next))}) if paginator.current.next
|
||||
{:update => "content", :url => options.merge(page_param => paginator.current.next)},
|
||||
{:href => url_for(:params => options.merge(page_param => paginator.current.next))}) if paginator.current.next
|
||||
html
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user