just_paginate 0.0.14 → 0.0.15
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/just_paginate.rb +6 -6
- metadata +1 -1
data/lib/just_paginate.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# -*- coding: utf-8 -*-
|
2
2
|
module JustPaginate
|
3
3
|
|
4
|
-
VERSION = "0.0.
|
4
|
+
VERSION = "0.0.15"
|
5
5
|
|
6
6
|
# TODO make sure negative numbers, non-integers etc are just converted to page 1.
|
7
7
|
def self.page_value(page)
|
@@ -59,19 +59,19 @@ module JustPaginate
|
|
59
59
|
page_element = ""
|
60
60
|
|
61
61
|
if label == "..."
|
62
|
-
page_element = "<a class='disabled'>#{label}</
|
62
|
+
page_element = "<li><a class='disabled'>#{label}</a></li>"
|
63
63
|
elsif label == "<"
|
64
64
|
page_url = yield(curr_page-1)
|
65
|
-
page_element = "<a rel='prev' href='#{page_url}'>#{label}</a>"
|
65
|
+
page_element = "<li><a rel='prev' href='#{page_url}'>#{label}</a></li>"
|
66
66
|
elsif label == ">"
|
67
67
|
page_url = yield(curr_page+1)
|
68
|
-
page_element = "<a rel='next' href='#{page_url}'>#{label}</a>"
|
68
|
+
page_element = "<li><a rel='next' href='#{page_url}'>#{label}</a></li>"
|
69
69
|
else
|
70
70
|
page_url = yield(label)
|
71
71
|
if label.to_i == curr_page
|
72
|
-
page_element = "<a class='active'>#{label}</
|
72
|
+
page_element = "<li><a class='active'>#{label}</a></li>"
|
73
73
|
else
|
74
|
-
page_element = "<a href='#{page_url}'>#{label}</a>"
|
74
|
+
page_element = "<li><a href='#{page_url}'>#{label}</a></li>"
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|