kaminari 0.9.7 → 0.9.8
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of kaminari might be problematic. Click here for more details.
- data/CHANGELOG +5 -0
- data/README.rdoc +13 -1
- data/VERSION +1 -1
- data/app/views/kaminari/_next_link.html.erb +1 -1
- data/app/views/kaminari/_next_link.html.haml +1 -1
- data/app/views/kaminari/_prev_link.html.erb +1 -1
- data/app/views/kaminari/_prev_link.html.haml +1 -1
- data/app/views/kaminari/_truncated_span.html.erb +1 -1
- data/app/views/kaminari/_truncated_span.html.haml +1 -1
- data/config/locales/kaminari.yml +8 -0
- data/kaminari.gemspec +2 -2
- data/lib/generators/kaminari/views_generator.rb +9 -5
- metadata +4 -4
- data/TODO.txt +0 -3
data/CHANGELOG
CHANGED
data/README.rdoc
CHANGED
@@ -89,6 +89,18 @@ This would output something like 1 ...(snip)... 18 19 20 while having 20 pages i
|
|
89
89
|
This would add data-remote="true" to all the links inside.
|
90
90
|
<%= paginate @users, :remote => true %>
|
91
91
|
|
92
|
+
=== I18n and labels
|
93
|
+
|
94
|
+
The default labels for 'previous', '...' and 'next' are rendered through I18n API.
|
95
|
+
So, for example, if you want to change the "prev_label" to '<-', add it to a YAML file in your Rails.root/config/locales directory. Keys and the default values are the following.
|
96
|
+
|
97
|
+
en:
|
98
|
+
views:
|
99
|
+
pagination:
|
100
|
+
previous: "« Prev"
|
101
|
+
next: "Next »"
|
102
|
+
truncate: "..."
|
103
|
+
|
92
104
|
=== Customizing the pagination helper
|
93
105
|
|
94
106
|
Kaminari includes a handy template generator.
|
@@ -114,7 +126,7 @@ To see the full list of avaliable themes, take a look at the themes repository,
|
|
114
126
|
|
115
127
|
== For more information
|
116
128
|
|
117
|
-
Check out Kaminari recipes on the GitHub Wiki.
|
129
|
+
Check out Kaminari recipes on the GitHub Wiki for more advanced tips and techniques.
|
118
130
|
https://github.com/amatsuda/kaminari/wiki/Kaminari-recipes
|
119
131
|
|
120
132
|
== Questions, Feedbacks
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.9.
|
1
|
+
0.9.8
|
@@ -6,4 +6,4 @@
|
|
6
6
|
per_page: number of items to fetch per page
|
7
7
|
remote: data-remote
|
8
8
|
%span.prev
|
9
|
-
= link_to raw(
|
9
|
+
= link_to raw(t 'views.pagination.previous'), url, :class => 'prev', :rel => 'prev', :remote => remote
|
data/kaminari.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{kaminari}
|
8
|
-
s.version = "0.9.
|
8
|
+
s.version = "0.9.8"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Akira Matsuda"]
|
@@ -25,7 +25,6 @@ Gem::Specification.new do |s|
|
|
25
25
|
"LICENSE.txt",
|
26
26
|
"README.rdoc",
|
27
27
|
"Rakefile",
|
28
|
-
"TODO.txt",
|
29
28
|
"VERSION",
|
30
29
|
"app/views/kaminari/_current_page.html.erb",
|
31
30
|
"app/views/kaminari/_current_page.html.haml",
|
@@ -47,6 +46,7 @@ Gem::Specification.new do |s|
|
|
47
46
|
"app/views/kaminari/_prev_span.html.haml",
|
48
47
|
"app/views/kaminari/_truncated_span.html.erb",
|
49
48
|
"app/views/kaminari/_truncated_span.html.haml",
|
49
|
+
"config/locales/kaminari.yml",
|
50
50
|
"kaminari.gemspec",
|
51
51
|
"lib/generators/kaminari/views_generator.rb",
|
52
52
|
"lib/kaminari.rb",
|
@@ -36,13 +36,17 @@ BANNER
|
|
36
36
|
|
37
37
|
private
|
38
38
|
def self.themes
|
39
|
-
|
39
|
+
begin
|
40
|
+
@themes ||= open ALL_API do |json|
|
40
41
|
# open File.join File.dirname(__FILE__), '../../../spec/generators/sample.json' do |json|
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
42
|
+
files = ActiveSupport::JSON.decode(json)['blobs']
|
43
|
+
hash = files.group_by {|fn, _| fn[0...(fn.index('/') || 0)]}.delete_if {|fn, _| fn.blank?}
|
44
|
+
hash.map do |name, files|
|
45
|
+
Theme.new name, files
|
46
|
+
end
|
45
47
|
end
|
48
|
+
rescue SocketError
|
49
|
+
[]
|
46
50
|
end
|
47
51
|
end
|
48
52
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kaminari
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 43
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
|
-
-
|
10
|
-
version: 0.9.
|
9
|
+
- 8
|
10
|
+
version: 0.9.8
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Akira Matsuda
|
@@ -251,7 +251,6 @@ files:
|
|
251
251
|
- LICENSE.txt
|
252
252
|
- README.rdoc
|
253
253
|
- Rakefile
|
254
|
-
- TODO.txt
|
255
254
|
- VERSION
|
256
255
|
- app/views/kaminari/_current_page.html.erb
|
257
256
|
- app/views/kaminari/_current_page.html.haml
|
@@ -273,6 +272,7 @@ files:
|
|
273
272
|
- app/views/kaminari/_prev_span.html.haml
|
274
273
|
- app/views/kaminari/_truncated_span.html.erb
|
275
274
|
- app/views/kaminari/_truncated_span.html.haml
|
275
|
+
- config/locales/kaminari.yml
|
276
276
|
- kaminari.gemspec
|
277
277
|
- lib/generators/kaminari/views_generator.rb
|
278
278
|
- lib/kaminari.rb
|
data/TODO.txt
DELETED