pagy 3.8.3 → 3.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- 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 +10 -2
- data/lib/pagy/frontend.rb +1 -0
- 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: 76e3d9bead25964339d54c1cd73d9e907da2339e3f06b260f9cee31fa595deca
|
4
|
+
data.tar.gz: 6b4babd77239dee7f8d5bdc599fc621aeae42089fd7a2c0689010e1f5f8fafb4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d52670d1b6b9e8145589ce948fbbc4332a946fbd955a3a2bdca3acbb591c33cb6e956e83a2a8b9c50545ccd80b709c4f0709296be6330e22031990cbd8e17116
|
7
|
+
data.tar.gz: 8e0c0a3ba6d655386de0a50a53e315c854a88319fdafa5792e94fd4f432be263eee420840f54bcbb206b505b26cbf850faa07db6eef66157f91391f5c43ff89f
|
data/LICENSE.txt
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
The MIT License (MIT)
|
2
2
|
|
3
|
-
Copyright (c) 2017-
|
3
|
+
Copyright (c) 2017-2020 Domizio Demichelis
|
4
4
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
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.
|
4
|
+
# Pagy initializer file (3.9.0)
|
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,15 +15,23 @@ 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="#{
|
18
|
+
pagy.prev ? %(<span class="page prev"><a href="#{pagy_url_for(pagy.prev, 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
|
|
22
22
|
def pagy_next_link(pagy, text = pagy_t('pagy.nav.next'), link_extra = '')
|
23
|
-
pagy.next ? %(<span class="page next"><a href="#{
|
23
|
+
pagy.next ? %(<span class="page next"><a href="#{pagy_url_for(pagy.next, pagy)}" rel="next" aria-label="next" #{pagy.vars[:link_extra]} #{link_extra}>#{text}</a></span>)
|
24
24
|
: %(<span class="page next disabled">#{text}</span>)
|
25
25
|
end
|
26
26
|
|
27
|
+
def pagy_prev_link_tag(pagy)
|
28
|
+
%(<link href="#{pagy_url_for(pagy.prev, pagy)}" rel="prev"/>) if pagy.prev
|
29
|
+
end
|
30
|
+
|
31
|
+
def pagy_next_link_tag(pagy)
|
32
|
+
%(<link href="#{pagy_url_for(pagy.next, pagy)}" rel="next"/>) if pagy.next
|
33
|
+
end
|
34
|
+
|
27
35
|
end
|
28
36
|
|
29
37
|
end
|
data/lib/pagy/frontend.rb
CHANGED
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.
|
4
|
+
version: 3.9.0
|
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-10-21 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,
|