will_paginate_serial_link_renderer 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b7a6a5b7c13a3b8be909fd0eea584970d2ce8a1
|
4
|
+
data.tar.gz: 21f4633d8de89e5413b981f00c23f8dddd766d24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3c7a2236c1519390136451cdd618e7caab32701ecee33f0a29294db6fa5cb9d01a705d88878fb5c10d89ded4c58964c666dadec9122042066e868515ffc8c0ec
|
7
|
+
data.tar.gz: 34d8a85106c1e2554e34c01ab67a0d6a7a6ae0d31578adae9f18937baf12a052d0b10ff6060dcfede4940f60c94c109f5015723a2000a9c190eb91e8c7ea1c67
|
@@ -19,7 +19,7 @@ module WillPaginateSerialLinkRenderer
|
|
19
19
|
def to_html
|
20
20
|
[
|
21
21
|
previous_page_tag,
|
22
|
-
tag(:div, nil, {:"data-pagination" => pagination[1..-2]}),
|
22
|
+
tag(:div, nil, {:"data-pagination" => represent_pages_as_string(pagination[1..-2])}),
|
23
23
|
next_page_tag
|
24
24
|
].join('')
|
25
25
|
end
|
@@ -36,18 +36,22 @@ module WillPaginateSerialLinkRenderer
|
|
36
36
|
|
37
37
|
def previous_page_tag
|
38
38
|
if previous_page
|
39
|
-
tag(:div, "Previous", {:"data-pagination" => previous_page})
|
39
|
+
tag(:div, "Previous", {:"data-pagination" => "prev:#{previous_page}", :class => "pagination-tag"})
|
40
40
|
else
|
41
|
-
|
41
|
+
tag(:div, "Previous", {:"data-pagination" => "prev:nil", :class => "pagination-tag"})
|
42
42
|
end
|
43
43
|
end
|
44
44
|
|
45
45
|
def next_page_tag
|
46
46
|
if next_page
|
47
|
-
tag(:div, "Next", {:"data-pagination" => next_page})
|
47
|
+
tag(:div, "Next", {:"data-pagination" => "next:#{next_page}", :class => "pagination-tag"})
|
48
48
|
else
|
49
|
-
|
49
|
+
tag(:div, "Next", {:"data-pagination" => "next:nil", :class => "pagination-tag"})
|
50
50
|
end
|
51
51
|
end
|
52
|
+
|
53
|
+
def represent_pages_as_string(items)
|
54
|
+
items.map(&:to_s).join('+')
|
55
|
+
end
|
52
56
|
end
|
53
57
|
end
|