filterer 0.3.0 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/helpers/filterer/pagination_helper.rb +7 -4
- data/lib/filterer/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce88e393c6fbd95794c9813c461e823e18b9d393
|
4
|
+
data.tar.gz: 2c16b6712adcaee1a677897f58527dea69ad751f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d8ad65ec7d16e2cd3cc07a74f51f04077656be5f93865e40c468d9084dffe7e5f86b69491ed405b2543c123cec1252df70d6b22abfeeb26dd284853ded339ef6
|
7
|
+
data.tar.gz: 2d67f33c0b96f1017fb73043eb3446b8c8aea9476351ff73d22182d17ce389e100ad8e020be5b718be8b834eac5d0b1acf7f503a26b34e4bec3767587a9d2f9b
|
@@ -1,6 +1,9 @@
|
|
1
1
|
module Filterer
|
2
2
|
module PaginationHelper
|
3
3
|
|
4
|
+
RIGHT_ARROW = '›'.html_safe
|
5
|
+
LEFT_ARROW = '‹'.html_safe
|
6
|
+
|
4
7
|
def render_filterer_pagination(filterer)
|
5
8
|
content_tag(:div, class: 'pagination-wrapper') do
|
6
9
|
content_tag(:ul, class: 'unstyled') do
|
@@ -19,10 +22,10 @@ module Filterer
|
|
19
22
|
def render_filterer_previous_link(filterer)
|
20
23
|
content_tag(:li, class: filterer.meta[:page] == 1 ? "disabled" : '') do
|
21
24
|
if filterer.meta[:page] == 1
|
22
|
-
content_tag(:span) {
|
25
|
+
content_tag(:span) { LEFT_ARROW }
|
23
26
|
else
|
24
27
|
content_tag(:a, class: 'pagination-previous',
|
25
|
-
href: calculate_filterer_pagination_url(filterer.meta[:page] - 1)) {
|
28
|
+
href: calculate_filterer_pagination_url(filterer.meta[:page] - 1)) { LEFT_ARROW }
|
26
29
|
end
|
27
30
|
end
|
28
31
|
end
|
@@ -30,9 +33,9 @@ module Filterer
|
|
30
33
|
def render_filterer_next_link(filterer)
|
31
34
|
content_tag(:li, class: filterer.meta[:page] == filterer.meta[:last_page] ? "disabled" : '') do
|
32
35
|
if filterer.meta[:page] == filterer.meta[:last_page]
|
33
|
-
content_tag(:span) {
|
36
|
+
content_tag(:span) { RIGHT_ARROW }
|
34
37
|
else
|
35
|
-
content_tag(:a, class: 'pagination-next', href: calculate_filterer_pagination_url(filterer.meta[:page] + 1)) {
|
38
|
+
content_tag(:a, class: 'pagination-next', href: calculate_filterer_pagination_url(filterer.meta[:page] + 1)) { RIGHT_ARROW }
|
36
39
|
end
|
37
40
|
end
|
38
41
|
end
|
data/lib/filterer/version.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: filterer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Becker
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.
|
19
|
+
version: 4.0.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.
|
26
|
+
version: 4.0.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: capybara
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|