-
Notifications
You must be signed in to change notification settings - Fork 1
/
will_paginate_renderers.rb
38 lines (35 loc) · 1.14 KB
/
will_paginate_renderers.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
require 'will_paginate/view_helpers'
require 'will_paginate/view_helpers/action_view'
# = Will Paginate Renderers
#
# A collection of custom renderers for the +will_paginate+ helper.
#
# == Renderers
#
# === Gmail
#
# Oldest/Older and Newer/Newest links as needed, as well as
# "(start) - (end) of (total)" text.
#
# === Twitter
#
# A single "More" button when there are more results in the collection.
module WillPaginateRenderers
autoload :Gmail, 'will_paginate_renderers/gmail'
autoload :Twitter, 'will_paginate_renderers/twitter'
def self.pagination_options() @pagination_options; end
def self.pagination_options=(value) @pagination_options = value; end
self.pagination_options = {
:twitter_label => 'More',
:twitter_class => 'twitter_pagination',
:gmail_newest_label => "« Newest",
:gmail_newer_label => "< Newer",
:gmail_older_label => "Older >",
:gmail_oldest_label => "Oldest »",
:gmail_newest_class => "gmail_newest",
:gmail_newer_class => "gmail_newer",
:gmail_older_class => "gmail_older",
:gmail_oldest_class => "gmail_oldest",
:gmail_window_class => "gmail_window",
}
end