Commit 347fbb41e0e2a857e27939c922c460061b50d745
1 parent
3138ed82
Exists in
master
and in
29 other branches
Generate translatable pagination links
Also removed the duplication of pagination links methods (ActionItem1588)
Showing
6 changed files
with
7 additions
and
17 deletions
Show diff stats
app/helpers/application_helper.rb
@@ -1110,4 +1110,9 @@ module ApplicationHelper | @@ -1110,4 +1110,9 @@ module ApplicationHelper | ||
1110 | link_to(content_tag(:span, _('Communities Menu')), '#', :onclick => "toggleSubmenu(this,'',#{links.to_json}); return false", :class => 'menu-submenu-trigger up', :id => 'submenu-communities-trigger') | 1110 | link_to(content_tag(:span, _('Communities Menu')), '#', :onclick => "toggleSubmenu(this,'',#{links.to_json}); return false", :class => 'menu-submenu-trigger up', :id => 'submenu-communities-trigger') |
1111 | end | 1111 | end |
1112 | 1112 | ||
1113 | + def pagination_links(collection, options={}) | ||
1114 | + options = {:prev_label => '« ' + _('Previous'), :next_label => _('Next') + ' »'}.merge(options) | ||
1115 | + will_paginate(collection, options) | ||
1116 | + end | ||
1117 | + | ||
1113 | end | 1118 | end |
app/helpers/friends_helper.rb
@@ -5,9 +5,4 @@ module FriendsHelper | @@ -5,9 +5,4 @@ module FriendsHelper | ||
5 | link_to text, options | 5 | link_to text, options |
6 | end | 6 | end |
7 | 7 | ||
8 | - def pagination_links(collection, options={}) | ||
9 | - options = {:prev_label => '« ' + _('Previous'), :next_label => _('Next') + ' »'}.merge(options) | ||
10 | - will_paginate(collection, options) | ||
11 | - end | ||
12 | - | ||
13 | end | 8 | end |
app/helpers/profile_helper.rb
@@ -15,9 +15,4 @@ module ProfileHelper | @@ -15,9 +15,4 @@ module ProfileHelper | ||
15 | end | 15 | end |
16 | end | 16 | end |
17 | 17 | ||
18 | - def pagination_links(collection, options={}) | ||
19 | - options = {:prev_label => '« ' + _('Previous'), :next_label => _('Next') + ' »'}.merge(options) | ||
20 | - will_paginate(collection, options) | ||
21 | - end | ||
22 | - | ||
23 | end | 18 | end |
app/helpers/search_helper.rb
@@ -98,11 +98,6 @@ module SearchHelper | @@ -98,11 +98,6 @@ module SearchHelper | ||
98 | ), :class => 'profile-info') | 98 | ), :class => 'profile-info') |
99 | end | 99 | end |
100 | 100 | ||
101 | - def pagination_links(collection, options={}) | ||
102 | - options = {:prev_label => '« ' + _('Previous'), :next_label => _('Next') + ' »'}.merge(options) | ||
103 | - will_paginate(collection, options) | ||
104 | - end | ||
105 | - | ||
106 | def product_categories_menu(asset, product_category, object_ids = nil) | 101 | def product_categories_menu(asset, product_category, object_ids = nil) |
107 | cats = ProductCategory.menu_categories(@product_category, environment) | 102 | cats = ProductCategory.menu_categories(@product_category, environment) |
108 | cats += cats.select { |c| c.children_count > 0 }.map(&:children).flatten | 103 | cats += cats.select { |c| c.children_count > 0 }.map(&:children).flatten |
app/views/browse/communities.rhtml
app/views/browse/people.rhtml