just_paginate 0.0.15 → 0.0.16
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/just_paginate.rb +3 -3
- 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.16"
|
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,7 +59,7 @@ module JustPaginate
|
|
59
59
|
page_element = ""
|
60
60
|
|
61
61
|
if label == "..."
|
62
|
-
page_element = "<li
|
62
|
+
page_element = "<li class='disabled'><a>#{label}</a></li>"
|
63
63
|
elsif label == "<"
|
64
64
|
page_url = yield(curr_page-1)
|
65
65
|
page_element = "<li><a rel='prev' href='#{page_url}'>#{label}</a></li>"
|
@@ -69,7 +69,7 @@ module JustPaginate
|
|
69
69
|
else
|
70
70
|
page_url = yield(label)
|
71
71
|
if label.to_i == curr_page
|
72
|
-
page_element = "<li
|
72
|
+
page_element = "<li class='active'><a>#{label}</a></li>"
|
73
73
|
else
|
74
74
|
page_element = "<li><a href='#{page_url}'>#{label}</a></li>"
|
75
75
|
end
|