diff --git a/app/helpers/search_helper.rb b/app/helpers/search_helper.rb
index 414e4391..98fc27fa 100644
--- a/app/helpers/search_helper.rb
+++ b/app/helpers/search_helper.rb
@@ -57,4 +57,14 @@ module SearchHelper
end
('
' + links.map {|link| content_tag('li', link)}.join(' ') + '
') unless links.empty?
end
+
+ def link_to_previous_search_page(pagination_previous_date)
+ link_to_content_update('« ' + l(:label_previous),
+ params.merge(:previous => 1, :offset => pagination_previous_date.strftime("%Y%m%d%H%M%S")))
+ end
+
+ def link_to_next_search_page(pagination_next_date)
+ link_to_content_update(l(:label_next) + ' »',
+ params.merge(:previous => nil, :offset => pagination_next_date.strftime("%Y%m%d%H%M%S")))
+ end
end
diff --git a/app/views/search/index.rhtml b/app/views/search/index.rhtml
index 674cabf6..8e9e556c 100644
--- a/app/views/search/index.rhtml
+++ b/app/views/search/index.rhtml
@@ -38,12 +38,10 @@
<% if @pagination_previous_date %>
-<%= link_to_content_update('« ' + l(:label_previous),
- params.merge(:previous => 1, :offset => @pagination_previous_date.strftime("%Y%m%d%H%M%S"))) %>
+ <%= link_to_previous_search_page(@pagination_previous_date) %>
<% end %>
<% if @pagination_next_date %>
-<%= link_to_content_update(l(:label_next) + ' »',
- params.merge(:previous => nil, :offset => @pagination_next_date.strftime("%Y%m%d%H%M%S"))) %>
+ <%= link_to_next_search_page(@pagination_next_date) %>
<% end %>