pagy 3.8.1 → 3.8.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/config/pagy.rb +1 -1
- data/lib/javascripts/pagy.js +1 -1
- data/lib/pagy.rb +1 -1
- data/lib/pagy/extras/support.rb +1 -1
- data/lib/pagy/frontend.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eb6594ae7a224e823f3796f39c8c3603b0dd1c37f7883b362a2654d2cd85e9c3
|
4
|
+
data.tar.gz: 9fda3ae984287802b2f8a91d52cea1b9c88a3b406f0d0982fb357680f49b0bee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f2c47131206f194b5306d1c3f476405baf6e53265ee8e9fcf12bd86926605b767a9357ba699f2399aef597c89f362ed31b88571080b39453285ebeae6fd19d0a
|
7
|
+
data.tar.gz: c9a427a85448b69a1890d792e6f49192276c16c2c9b062d7a6c74c263d64fb3b39b39217598187b0dff38a69fe7f5dd3a16b4e3bfc7c613cc220222519134134
|
data/lib/config/pagy.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
# Pagy initializer file (3.8.
|
4
|
+
# Pagy initializer file (3.8.2)
|
5
5
|
# Customize only what you really need and notice that Pagy works also without any of the following lines.
|
6
6
|
# Should you just cherry pick part of this file, please maintain the require-order of the extras
|
7
7
|
|
data/lib/javascripts/pagy.js
CHANGED
data/lib/pagy.rb
CHANGED
data/lib/pagy/extras/support.rb
CHANGED
@@ -15,7 +15,7 @@ class Pagy
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def pagy_prev_link(pagy, text = pagy_t('pagy.nav.prev'), link_extra = '')
|
18
|
-
pagy.prev ? %(<span class="page prev"><a href="#{pagy_prev_url(pagy)}" rel="
|
18
|
+
pagy.prev ? %(<span class="page prev"><a href="#{pagy_prev_url(pagy)}" rel="prev" aria-label="previous" #{pagy.vars[:link_extra]} #{link_extra}>#{text}</a></span>)
|
19
19
|
: %(<span class="page prev disabled">#{text}</span>)
|
20
20
|
end
|
21
21
|
|
data/lib/pagy/frontend.rb
CHANGED
@@ -50,11 +50,11 @@ class Pagy
|
|
50
50
|
end
|
51
51
|
|
52
52
|
# Return examples: "Displaying items 41-60 of 324 in total" of "Displaying Products 41-60 of 324 in total"
|
53
|
-
def pagy_info(pagy)
|
53
|
+
def pagy_info(pagy, item_name=nil)
|
54
54
|
path = if (count = pagy.count) == 0 ; 'pagy.info.no_items'
|
55
55
|
else pagy.pages == 1 ? 'pagy.info.single_page' : 'pagy.info.multiple_pages'
|
56
56
|
end
|
57
|
-
pagy_t(path, item_name: pagy_t(pagy.vars[:i18n_key], count: count), count: count, from: pagy.from, to: pagy.to)
|
57
|
+
pagy_t(path, item_name: item_name || pagy_t(pagy.vars[:i18n_key], count: count), count: count, from: pagy.from, to: pagy.to)
|
58
58
|
end
|
59
59
|
|
60
60
|
# Returns a performance optimized proc to generate the HTML links
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pagy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.8.
|
4
|
+
version: 3.8.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Domizio Demichelis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: 'Agnostic pagination in plain ruby: it works with any framework, ORM
|
14
14
|
and DB type, with all kinds of collections, even pre-paginated, scopes, Arrays,
|