Commit 91659d7b55dbc968a8c655ba43958319067df3f1

Authored by Antonio Terceiro
1 parent d1462974

Replace deprecated parameter to will_paginate.

Also, removed explicit :previous_label and :next_label from calls to the
pagination_links helper that used the same string as the default ones
already provided by the helper. This needs will_paginate from Debian
Squeeze at least.
app/helpers/application_helper.rb
@@ -1142,7 +1142,7 @@ module ApplicationHelper @@ -1142,7 +1142,7 @@ module ApplicationHelper
1142 end 1142 end
1143 1143
1144 def pagination_links(collection, options={}) 1144 def pagination_links(collection, options={})
1145 - options = {:prev_label => '« ' + _('Previous'), :next_label => _('Next') + ' »'}.merge(options) 1145 + options = {:previous_label => '« ' + _('Previous'), :next_label => _('Next') + ' »'}.merge(options)
1146 will_paginate(collection, options) 1146 will_paginate(collection, options)
1147 end 1147 end
1148 1148
app/helpers/blog_helper.rb
@@ -17,7 +17,7 @@ module BlogHelper @@ -17,7 +17,7 @@ module BlogHelper
17 def list_posts(articles, format = 'full') 17 def list_posts(articles, format = 'full')
18 pagination = will_paginate(articles, { 18 pagination = will_paginate(articles, {
19 :param_name => 'npage', 19 :param_name => 'npage',
20 - :prev_label => _('« Newer posts'), 20 + :previous_label => _('« Newer posts'),
21 :next_label => _('Older posts »') 21 :next_label => _('Older posts »')
22 }) 22 })
23 content = [] 23 content = []
app/helpers/cms_helper.rb
@@ -16,7 +16,7 @@ module CmsHelper @@ -16,7 +16,7 @@ module CmsHelper
16 end 16 end
17 17
18 def pagination_links(collection, options={}) 18 def pagination_links(collection, options={})
19 - options = {:prev_label => '« ', :next_label => ' »', :page_links => false}.merge(options) 19 + options = {:previous_label => '« ', :next_label => ' »', :page_links => false}.merge(options)
20 will_paginate(collection, options) 20 will_paginate(collection, options)
21 end 21 end
22 22
app/helpers/forum_helper.rb
@@ -11,7 +11,7 @@ module ForumHelper @@ -11,7 +11,7 @@ module ForumHelper
11 def list_forum_posts(articles) 11 def list_forum_posts(articles)
12 pagination = will_paginate(articles, { 12 pagination = will_paginate(articles, {
13 :param_name => 'npage', 13 :param_name => 'npage',
14 - :prev_label => _('« Newer posts'), 14 + :previous_label => _('« Newer posts'),
15 :next_label => _('Older posts »') 15 :next_label => _('Older posts »')
16 }) 16 })
17 content = [content_tag('tr', 17 content = [content_tag('tr',
app/views/cms/view.rhtml
@@ -62,4 +62,4 @@ @@ -62,4 +62,4 @@
62 62
63 </table> 63 </table>
64 64
65 -<%= pagination_links @articles, {:param_name => 'npage', :prev_label => '&laquo; ' + _('Previous'), :next_label => _('Next') + ' &raquo;', :page_links => true} %> 65 +<%= pagination_links @articles, {:param_name => 'npage', :page_links => true} %>
app/views/shared/articles_list.rhtml
@@ -11,4 +11,4 @@ @@ -11,4 +11,4 @@
11 <% end %> 11 <% end %>
12 </table> 12 </table>
13 13
14 -<p><%= pagination_links(articles, {:param_name => 'npage', :prev_label => '&laquo; ' + _('Previous'), :next_label => _('Next') + ' &raquo;', :page_links => true}) %></p> 14 +<p><%= pagination_links(articles, {:param_name => 'npage', :page_links => true}) %></p>
debian/control
@@ -11,7 +11,7 @@ Vcs-Browser: http://git.colivre.coop.br/?p=noosfero.git @@ -11,7 +11,7 @@ Vcs-Browser: http://git.colivre.coop.br/?p=noosfero.git
11 11
12 Package: noosfero 12 Package: noosfero
13 Architecture: all 13 Architecture: all
14 -Depends: rails (>= 2.3.5-1~), rails-ruby1.8 (>= 2.3.5-1~), ruby1.8, ruby, rake, libgettext-rails-ruby1.8, libsqlite3-ruby, libpgsql-ruby, libmysql-ruby, librmagick-ruby, libredcloth-ruby, libwill-paginate-ruby, iso-codes, libfeedparser-ruby, libferret-ruby, libdaemons-ruby, rcov, mongrel, mongrel-cluster, tango-icon-theme, libhpricot-ruby, iso-codes, memcached, debconf, dbconfig-common, postgresql, adduser, ${misc:Depends} 14 +Depends: rails (>= 2.3.5-1~), rails-ruby1.8 (>= 2.3.5-1~), ruby1.8, ruby, rake, libgettext-rails-ruby1.8, libsqlite3-ruby, libpgsql-ruby, libmysql-ruby, librmagick-ruby, libredcloth-ruby, libwill-paginate-ruby (>= 2.3.12-1~), iso-codes, libfeedparser-ruby, libferret-ruby, libdaemons-ruby, rcov, mongrel, mongrel-cluster, tango-icon-theme, libhpricot-ruby, iso-codes, memcached, debconf, dbconfig-common, postgresql, adduser, ${misc:Depends}
15 Recommends: postgresql-client 15 Recommends: postgresql-client
16 Description: free web-based platform for social networks 16 Description: free web-based platform for social networks
17 Noosfero is a web platform for social and solidarity economy networks with 17 Noosfero is a web platform for social and solidarity economy networks with