pagy 3.3.2 → 3.6.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/lib/config/pagy.rb +13 -1
- data/lib/javascripts/pagy.js +2 -0
- data/lib/locales/ca.yml +22 -0
- data/lib/locales/ko.yml +20 -0
- data/lib/locales/utils/p11n.rb +1 -0
- data/lib/pagy.rb +1 -1
- data/lib/pagy/extras/arel.rb +31 -0
- data/lib/pagy/extras/elasticsearch_rails.rb +11 -9
- data/lib/pagy/extras/metadata.rb +37 -0
- data/lib/pagy/extras/pagy_search.rb +4 -2
- data/lib/pagy/extras/searchkick.rb +8 -8
- data/lib/pagy/extras/uikit.rb +62 -0
- data/lib/templates/uikit_nav.html.erb +15 -0
- data/lib/templates/uikit_nav.html.haml +28 -0
- data/lib/templates/uikit_nav.html.slim +28 -0
- metadata +11 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d1414283eb3f96c82e975d0436ebf6dee87cdc037d91c152ed13dd97a3a2cc58
|
4
|
+
data.tar.gz: 907bc851219c314bbdfe95a373b77c562de51c81495ada5686d6c57b61be826c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9a3c417007ffa03a904714ac4d807adc215645e5518429a14490a3430426374a9bac45d55882e5a0c4e3969bdd258c5a78dad2c04f7ed6f775c9d8aa43abc798
|
7
|
+
data.tar.gz: 653e0bbd6b8b8c0b71b16f9983d3c7e5d2c14b33b176a5100a2cd7e63aaca41c565dbae0589bafcc2ee6c9e5b56939047a40668b2615e4db6f53fbeaf3cbc9d0
|
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.6.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
|
|
@@ -58,6 +58,10 @@
|
|
58
58
|
# See https://ddnexus.github.io/pagy/extras/semantic
|
59
59
|
# require 'pagy/extras/semantic'
|
60
60
|
|
61
|
+
# UIkit extra: Add nav helper and templates for UIkit pagination
|
62
|
+
# See https://ddnexus.github.io/pagy/extras/uikit
|
63
|
+
# require 'pagy/extras/uikit'
|
64
|
+
|
61
65
|
# Multi size var used by the *_nav_js helpers
|
62
66
|
# See https://ddnexus.github.io/pagy/extras/navs#steps
|
63
67
|
# Pagy::VARS[:steps] = { 0 => [2,3,3,2], 540 => [3,5,5,3], 720 => [5,7,7,5] } # example
|
@@ -85,6 +89,14 @@
|
|
85
89
|
# require 'pagy/extras/overflow'
|
86
90
|
# Pagy::VARS[:overflow] = :empty_page # default (other options: :last_page and :exception)
|
87
91
|
|
92
|
+
# Metadata extra: Provides the pagination metadata to Javascript frameworks like Vue.js, react.js, etc.
|
93
|
+
# See https://ddnexus.github.io/pagy/extras/metadata
|
94
|
+
# you must require the shared internal extra (BEFORE the metadata extra) ONLY if you need also the :sequels
|
95
|
+
# require 'pagy/extras/shared'
|
96
|
+
# require 'pagy/extras/metadata'
|
97
|
+
# For performance reason, you should explicitly set ONLY the metadata you use in the frontend
|
98
|
+
# Pagy::VARS[:metadata] = [:scaffold_url, :count, :page, :prev, :next, :last] # example
|
99
|
+
|
88
100
|
# Trim extra: Remove the page=1 param from links
|
89
101
|
# See https://ddnexus.github.io/pagy/extras/trim
|
90
102
|
# require 'pagy/extras/trim'
|
data/lib/javascripts/pagy.js
CHANGED
data/lib/locales/ca.yml
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# :one_other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/locales/utils/p11n.rb)
|
2
|
+
|
3
|
+
ca:
|
4
|
+
pagy:
|
5
|
+
|
6
|
+
item_name:
|
7
|
+
one: "element"
|
8
|
+
other: "elements"
|
9
|
+
|
10
|
+
nav:
|
11
|
+
prev: "‹ Anterior"
|
12
|
+
next: "Següent ›"
|
13
|
+
gap: "…"
|
14
|
+
|
15
|
+
info:
|
16
|
+
no_items: "No s'ha trobat cap resultat"
|
17
|
+
single_page: "Mostrant <b>%{count}</b> %{item_name}"
|
18
|
+
multiple_pages: "Mostrant %{item_name} <b>%{from}-%{to}</b> de <b>%{count}</b> en total"
|
19
|
+
|
20
|
+
combo_nav_js: "Pàgina %{page_input} de %{pages}"
|
21
|
+
|
22
|
+
items_selector_js: "Mostra %{items_input} %{item_name} per pàgina"
|
data/lib/locales/ko.yml
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
# :other pluralization (see https://github.com/ddnexus/pagy/blob/master/lib/locales/utils/p11n.rb)
|
2
|
+
|
3
|
+
ko:
|
4
|
+
pagy:
|
5
|
+
|
6
|
+
item_name: "항목"
|
7
|
+
|
8
|
+
nav:
|
9
|
+
prev: "‹ 이전"
|
10
|
+
next: "이후 ›"
|
11
|
+
gap: "…"
|
12
|
+
|
13
|
+
info:
|
14
|
+
no_items: "%{item_name} 없음"
|
15
|
+
single_page: "<b>%{count}</b>개의 %{item_name} 표시됨"
|
16
|
+
multiple_pages: "총 <b>%{count}</b>개의 %{item_name} 중 <b>%{from}-%{to}</b>"
|
17
|
+
|
18
|
+
combo_nav_js: "총 %{pages} 중 %{page_input} 페이지"
|
19
|
+
|
20
|
+
items_selector_js: "페이지 당 %{items_input}개 표시%"
|
data/lib/locales/utils/p11n.rb
CHANGED
@@ -63,6 +63,7 @@ plurals = Hash.new(p11n[:one_other]).tap do |hash|
|
|
63
63
|
hash['id'] = p11n[:other]
|
64
64
|
hash['fr'] = p11n[:one_upto_two_other]
|
65
65
|
hash['ja'] = p11n[:other]
|
66
|
+
hash['ko'] = p11n[:other]
|
66
67
|
hash['pl'] = p11n[:polish]
|
67
68
|
hash['ru'] = p11n[:east_slavic]
|
68
69
|
hash['se'] = p11n[:one_two_other]
|
data/lib/pagy.rb
CHANGED
@@ -0,0 +1,31 @@
|
|
1
|
+
# See the Pagy documentation: https://ddnexus.github.io/pagy/extras/arel
|
2
|
+
# encoding: utf-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
class Pagy
|
6
|
+
module Backend ; private
|
7
|
+
|
8
|
+
def pagy_arel(collection, vars={})
|
9
|
+
pagy = Pagy.new(pagy_arel_get_vars(collection, vars))
|
10
|
+
return pagy, pagy_get_items(collection, pagy)
|
11
|
+
end
|
12
|
+
|
13
|
+
def pagy_arel_get_vars(collection, vars)
|
14
|
+
vars[:count] ||= pagy_arel_count(collection)
|
15
|
+
vars[:page] ||= params[ vars[:page_param] || VARS[:page_param] ]
|
16
|
+
vars
|
17
|
+
end
|
18
|
+
|
19
|
+
def pagy_arel_count(collection)
|
20
|
+
if collection.group_values.empty?
|
21
|
+
# COUNT(*)
|
22
|
+
collection.count(:all)
|
23
|
+
else
|
24
|
+
# COUNT(*) OVER ()
|
25
|
+
sql = Arel.star.count.over(Arel::Nodes::Grouping.new([]))
|
26
|
+
collection.unscope(:order).limit(1).pluck(sql).first
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
31
|
+
end
|
@@ -13,7 +13,8 @@ class Pagy
|
|
13
13
|
def self.new_from_elasticsearch_rails(response, vars={})
|
14
14
|
vars[:items] = response.search.options[:size] || 10
|
15
15
|
vars[:page] = (response.search.options[:from] || 0) / vars[:items] + 1
|
16
|
-
|
16
|
+
total = response.raw_response['hits']['total']
|
17
|
+
vars[:count] = total.is_a?(Hash) ? total['value'] : total
|
17
18
|
new(vars)
|
18
19
|
end
|
19
20
|
|
@@ -21,17 +22,18 @@ class Pagy
|
|
21
22
|
module Backend ; private
|
22
23
|
|
23
24
|
# Return Pagy object and items
|
24
|
-
def pagy_elasticsearch_rails(
|
25
|
-
model,
|
26
|
-
vars
|
27
|
-
|
28
|
-
|
29
|
-
response
|
30
|
-
|
25
|
+
def pagy_elasticsearch_rails(pagy_search_args, vars={})
|
26
|
+
model, search_args, _block, *called = pagy_search_args
|
27
|
+
vars = pagy_elasticsearch_rails_get_vars(nil, vars)
|
28
|
+
search_args[-1][:size] = vars[:items]
|
29
|
+
search_args[-1][:from] = vars[:items] * (vars[:page] - 1)
|
30
|
+
response = model.search(*search_args)
|
31
|
+
total = response.raw_response['hits']['total']
|
32
|
+
vars[:count] = total.is_a?(Hash) ? total['value'] : total
|
31
33
|
pagy = Pagy.new(vars)
|
32
34
|
# with :last_page overflow we need to re-run the method in order to get the hits
|
33
35
|
if defined?(OVERFLOW) && pagy.overflow? && pagy.vars[:overflow] == :last_page
|
34
|
-
return pagy_elasticsearch_rails(
|
36
|
+
return pagy_elasticsearch_rails(pagy_search_args, vars.merge(page: pagy.page))
|
35
37
|
end
|
36
38
|
return pagy, called.empty? ? response : response.send(*called)
|
37
39
|
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# See the Pagy documentation: https://ddnexus.github.io/pagy/extras/metadata
|
2
|
+
# encoding: utf-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
class Pagy
|
6
|
+
# Add a specialized backend method for pagination metadata
|
7
|
+
module Backend ; private
|
8
|
+
|
9
|
+
METADATA = [ :scaffold_url, :first_url, :prev_url, :page_url, :next_url, :last_url,
|
10
|
+
:count, :page, :items, :vars, :pages, :last, :from, :to, :prev, :next, :series ]
|
11
|
+
METADATA << :sequels if VARS.key?(:steps) # :steps gets defined along with the #sequels method
|
12
|
+
|
13
|
+
VARS[:metadata] = METADATA.dup
|
14
|
+
|
15
|
+
include Helpers
|
16
|
+
|
17
|
+
def pagy_metadata(pagy, url=false)
|
18
|
+
names = pagy.vars[:metadata]
|
19
|
+
(unknown = names - METADATA).empty? or raise(VariableError.new(pagy), "unknown metadata #{unknown.inspect}")
|
20
|
+
scaffold_url = pagy_url_for(Frontend::MARK, pagy, url)
|
21
|
+
metadata = {}
|
22
|
+
names.each do |key|
|
23
|
+
metadata[key] = case key
|
24
|
+
when :scaffold_url ; scaffold_url
|
25
|
+
when :first_url ; scaffold_url.sub(Frontend::MARK, 1.to_s)
|
26
|
+
when :prev_url ; scaffold_url.sub(Frontend::MARK, pagy.prev.to_s)
|
27
|
+
when :page_url ; scaffold_url.sub(Frontend::MARK, pagy.page.to_s)
|
28
|
+
when :next_url ; scaffold_url.sub(Frontend::MARK, pagy.next.to_s)
|
29
|
+
when :last_url ; scaffold_url.sub(Frontend::MARK, pagy.last.to_s)
|
30
|
+
else pagy.send(key)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
metadata
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
@@ -7,8 +7,10 @@ class Pagy
|
|
7
7
|
# returns an array used to delay the call of #search
|
8
8
|
# after the pagination variables are merged to the options
|
9
9
|
# it also pushes to the same array an eventually called method and arguments
|
10
|
-
|
11
|
-
|
10
|
+
# the last search argument must be a hash option
|
11
|
+
def pagy_search(*search_args, &block)
|
12
|
+
search_args << {} unless search_args[-1].is_a?(Hash)
|
13
|
+
[self, search_args, block].tap do |args|
|
12
14
|
args.define_singleton_method(:method_missing){|*a| args += a}
|
13
15
|
end
|
14
16
|
end
|
@@ -21,17 +21,17 @@ class Pagy
|
|
21
21
|
module Backend ; private
|
22
22
|
|
23
23
|
# Return Pagy object and results
|
24
|
-
def pagy_searchkick(
|
25
|
-
model,
|
26
|
-
vars
|
27
|
-
|
28
|
-
|
29
|
-
results
|
30
|
-
vars[:count]
|
24
|
+
def pagy_searchkick(pagy_search_args, vars={})
|
25
|
+
model, search_args, block, *called = pagy_search_args
|
26
|
+
vars = pagy_searchkick_get_vars(nil, vars)
|
27
|
+
search_args[-1][:per_page] = vars[:items]
|
28
|
+
search_args[-1][:page] = vars[:page]
|
29
|
+
results = model.search(*search_args, &block)
|
30
|
+
vars[:count] = results.total_count
|
31
31
|
pagy = Pagy.new(vars)
|
32
32
|
# with :last_page overflow we need to re-run the method in order to get the hits
|
33
33
|
if defined?(OVERFLOW) && pagy.overflow? && pagy.vars[:overflow] == :last_page
|
34
|
-
return pagy_searchkick(
|
34
|
+
return pagy_searchkick(pagy_search_args, vars.merge(page: pagy.page))
|
35
35
|
end
|
36
36
|
return pagy, called.empty? ? results : results.send(*called)
|
37
37
|
end
|
@@ -0,0 +1,62 @@
|
|
1
|
+
# See the Pagy documentation: https://ddnexus.github.io/pagy/extras/uikit
|
2
|
+
# encoding: utf-8
|
3
|
+
# frozen_string_literal: true
|
4
|
+
|
5
|
+
require 'pagy/extras/shared'
|
6
|
+
|
7
|
+
class Pagy
|
8
|
+
module Frontend
|
9
|
+
|
10
|
+
# Pagination for uikit: it returns the html with the series of links to the pages
|
11
|
+
def pagy_uikit_nav(pagy)
|
12
|
+
link, p_prev, p_next = pagy_link_proc(pagy), pagy.prev, pagy.next
|
13
|
+
|
14
|
+
previous_span = "<span uk-pagination-previous>#{pagy_t('pagy.nav.prev')}</span>"
|
15
|
+
html = EMPTY + (p_prev ? %(<li>#{link.call p_prev, previous_span}</li>)
|
16
|
+
: %(<li class="uk-disabled"><a href="#">#{previous_span}</a></li>))
|
17
|
+
pagy.series.each do |item|
|
18
|
+
html << if item.is_a?(Integer); %(<li>#{link.call item}</li>)
|
19
|
+
elsif item.is_a?(String) ; %(<li class="uk-active"><span>#{item}</span></li>)
|
20
|
+
elsif item == :gap ; %(<li class="uk-disabled"><span>#{pagy_t('pagy.nav.gap')}</span></li>)
|
21
|
+
end
|
22
|
+
end
|
23
|
+
next_span = "<span uk-pagination-next>#{pagy_t('pagy.nav.next')}</span>"
|
24
|
+
html << (p_next ? %(<li>#{link.call p_next, next_span}</li>)
|
25
|
+
: %(<li class="uk-disabled"><a href="#">#{next_span}</a></li>))
|
26
|
+
%(<ul class="pagy-uikit-nav uk-pagination uk-flex-center">#{html}</ul>)
|
27
|
+
end
|
28
|
+
|
29
|
+
# Javascript pagination for uikit: it returns a nav and a JSON tag used by the Pagy.nav javascript
|
30
|
+
def pagy_uikit_nav_js(pagy, id=pagy_id)
|
31
|
+
link, p_prev, p_next = pagy_link_proc(pagy), pagy.prev, pagy.next
|
32
|
+
previous_span = "<span uk-pagination-previous>#{pagy_t('pagy.nav.prev')}</span>"
|
33
|
+
next_span = "<span uk-pagination-next>#{pagy_t('pagy.nav.next')}</span>"
|
34
|
+
tags = { 'before' => p_prev ? %(<li>#{link.call p_prev, previous_span}</li>)
|
35
|
+
: %(<li class="uk-disabled"><a href="#">#{previous_span}</a></li>),
|
36
|
+
'link' => %(<li>#{link.call(MARK)}</li>),
|
37
|
+
'active' => %(<li class="uk-active"><span>#{MARK}</span></li>),
|
38
|
+
'gap' => %(<li class="uk-disabled"><span>#{pagy_t('pagy.nav.gap')}</span></li>),
|
39
|
+
'after' => p_next ? %(<li>#{link.call p_next, next_span}</li>)
|
40
|
+
: %(<li class="uk-disabled"><a href="#">#{next_span}</a></li>) }
|
41
|
+
%(<ul id="#{id}" class="pagy-uikit-nav-js uk-pagination uk-flex-center"></ul>#{pagy_json_tag(:nav, id, tags, pagy.sequels, defined?(TRIM) && pagy.vars[:page_param])})
|
42
|
+
end
|
43
|
+
|
44
|
+
# Javascript combo pagination for uikit: it returns a nav and a JSON tag used by the Pagy.combo_nav javascript
|
45
|
+
def pagy_uikit_combo_nav_js(pagy, id=pagy_id)
|
46
|
+
link, p_prev, p_next, p_page, p_pages = pagy_link_proc(pagy), pagy.prev, pagy.next, pagy.page, pagy.pages
|
47
|
+
|
48
|
+
html = %(<div id="#{id}" class="pagy-uikit-combo-nav-js uk-button-group">)
|
49
|
+
html = html + (p_prev ? link.call(p_prev, pagy_t('pagy.nav.prev'), 'class="uk-button uk-button-default"')
|
50
|
+
: %(<button class="uk-button uk-button-default" disabled>#{pagy_t('pagy.nav.prev')}</button>))
|
51
|
+
|
52
|
+
html << %(<div class="uk-text-middle uk-margin-left uk-margin-right">)
|
53
|
+
input = %(<input type="number" min="1" max="#{p_pages}" value="#{p_page}" class="uk-input" style="padding: 0; text-align: center; width: #{p_pages.to_s.length+1}rem;">)
|
54
|
+
html << pagy_t('pagy.combo_nav_js', page_input: input, count: p_page, pages: p_pages) + '</div>'
|
55
|
+
|
56
|
+
html << (p_next ? link.call(p_next, pagy_t('pagy.nav.next'), 'class="uk-button uk-button-default"')
|
57
|
+
: %(<button class="uk-button uk-button-default" disabled>#{pagy_t('pagy.nav.next')}</button>))
|
58
|
+
|
59
|
+
html << %(</div>#{pagy_json_tag(:combo_nav, id, p_page, pagy_marked_link(link), defined?(TRIM) && pagy.vars[:page_param])})
|
60
|
+
end
|
61
|
+
end
|
62
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<% link = pagy_link_proc(pagy) -%>
|
2
|
+
<%# -%> <ul class="uk-pagination uk-flex-center">
|
3
|
+
<% if page.prev -%> <li><%== link.call(pagy.prev, "<span uk-pagination-previous>#{pagy_t('pagy.nav.prev')}</span>") %></li>
|
4
|
+
<% else -%> <li class="uk-disabled"><a href="#"><span uk-pagination-previous><%== pagy_t('pagy.nav.prev') %></span></a></li>
|
5
|
+
<% end -%>
|
6
|
+
<% pagy.series.each do |item| -%>
|
7
|
+
<% if item.is_a?(Integer) -%> <li><%== link.call(item) %></li>
|
8
|
+
<% elsif item.is_a?(String) -%> <li class="uk-active"><span><%== item %></span></li>
|
9
|
+
<% elsif item == :gap -%> <li class="uk-disabled"><span><%== pagy_t('pagy.nav.gap') %></span></li>
|
10
|
+
<% end -%>
|
11
|
+
<% end -%>
|
12
|
+
<% if pagy.next -%> <li><%== link.call(p_next, "<span uk-pagination-next>#{pagy_t('pagy.nav.next')}</span>") %></li>
|
13
|
+
<% else -%> <li class="uk-disabled"><a href="#"><span uk-pagination-next><%== pagy_t('pagy.nav.next') %></span></a></li>
|
14
|
+
<% end -%>
|
15
|
+
<%# -%> </ul>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
- link = pagy_link_proc(pagy)
|
2
|
+
|
3
|
+
%ul.uk-pagination.uk-flex-center
|
4
|
+
- if page.prev
|
5
|
+
%li!= link.call(pagy.prev, "<span uk-pagination-previous>#{pagy_t('pagy.nav.prev')}</span>")
|
6
|
+
- else
|
7
|
+
%li.uk-disabled
|
8
|
+
%a{href: "#"}
|
9
|
+
%span{"uk-pagination-previous" => ""}!= pagy_t('pagy.nav.prev')
|
10
|
+
|
11
|
+
- pagy.series.each do |item|
|
12
|
+
- if item.is_a?(Integer)
|
13
|
+
%li!= link.call(item)
|
14
|
+
|
15
|
+
- elsif item.is_a?(String)
|
16
|
+
%li.uk-active
|
17
|
+
%span!= item
|
18
|
+
|
19
|
+
- elsif item == :gap
|
20
|
+
%li.uk-disabled
|
21
|
+
%span!= pagy_t('pagy.nav.gap')
|
22
|
+
|
23
|
+
- if pagy.next
|
24
|
+
%li!= link.call(p_next, "<span uk-pagination-next>#{pagy_t('pagy.nav.next')}</span>")
|
25
|
+
- else
|
26
|
+
%li.uk-disabled
|
27
|
+
%a{href: "#"}
|
28
|
+
%span{"uk-pagination-next" => ""}!= pagy_t('pagy.nav.next')
|
@@ -0,0 +1,28 @@
|
|
1
|
+
- link = pagy_link_proc(pagy)
|
2
|
+
|
3
|
+
ul.uk-pagination.uk-flex-center
|
4
|
+
- if page.prev
|
5
|
+
li== link.call(pagy.prev, "<span uk-pagination-previous>#{pagy_t('pagy.nav.prev')}</span>")
|
6
|
+
- else
|
7
|
+
li.uk-disabled
|
8
|
+
a href="#"
|
9
|
+
span uk-pagination-previous="" == pagy_t('pagy.nav.prev')
|
10
|
+
|
11
|
+
- pagy.series.each do |item|
|
12
|
+
- if item.is_a?(Integer)
|
13
|
+
li== link.call(item)
|
14
|
+
|
15
|
+
- elsif item.is_a?(String)
|
16
|
+
li.uk-active
|
17
|
+
span== item
|
18
|
+
|
19
|
+
- elsif item == :gap
|
20
|
+
li.uk-disabled
|
21
|
+
span== pagy_t('pagy.nav.gap')
|
22
|
+
|
23
|
+
- if pagy.next
|
24
|
+
li== link.call(p_next, "<span uk-pagination-next>#{pagy_t('pagy.nav.next')}</span>")
|
25
|
+
- else
|
26
|
+
li.uk-disabled
|
27
|
+
a href="#"
|
28
|
+
span uk-pagination-next="" == pagy_t('pagy.nav.next')
|
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.6.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: 2019-
|
11
|
+
date: 2019-10-06 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,
|
@@ -24,12 +24,14 @@ files:
|
|
24
24
|
- lib/javascripts/pagy.js
|
25
25
|
- lib/locales/README.md
|
26
26
|
- lib/locales/bg.yml
|
27
|
+
- lib/locales/ca.yml
|
27
28
|
- lib/locales/de.yml
|
28
29
|
- lib/locales/en.yml
|
29
30
|
- lib/locales/es.yml
|
30
31
|
- lib/locales/fr.yml
|
31
32
|
- lib/locales/id.yml
|
32
33
|
- lib/locales/ja.yml
|
34
|
+
- lib/locales/ko.yml
|
33
35
|
- lib/locales/nb.yml
|
34
36
|
- lib/locales/nl.yml
|
35
37
|
- lib/locales/pl.yml
|
@@ -47,6 +49,7 @@ files:
|
|
47
49
|
- lib/pagy/backend.rb
|
48
50
|
- lib/pagy/countless.rb
|
49
51
|
- lib/pagy/exceptions.rb
|
52
|
+
- lib/pagy/extras/arel.rb
|
50
53
|
- lib/pagy/extras/array.rb
|
51
54
|
- lib/pagy/extras/bootstrap.rb
|
52
55
|
- lib/pagy/extras/bulma.rb
|
@@ -57,6 +60,7 @@ files:
|
|
57
60
|
- lib/pagy/extras/i18n.rb
|
58
61
|
- lib/pagy/extras/items.rb
|
59
62
|
- lib/pagy/extras/materialize.rb
|
63
|
+
- lib/pagy/extras/metadata.rb
|
60
64
|
- lib/pagy/extras/navs.rb
|
61
65
|
- lib/pagy/extras/overflow.rb
|
62
66
|
- lib/pagy/extras/pagy_search.rb
|
@@ -65,6 +69,7 @@ files:
|
|
65
69
|
- lib/pagy/extras/shared.rb
|
66
70
|
- lib/pagy/extras/support.rb
|
67
71
|
- lib/pagy/extras/trim.rb
|
72
|
+
- lib/pagy/extras/uikit.rb
|
68
73
|
- lib/pagy/frontend.rb
|
69
74
|
- lib/templates/bootstrap_nav.html.erb
|
70
75
|
- lib/templates/bootstrap_nav.html.haml
|
@@ -78,6 +83,9 @@ files:
|
|
78
83
|
- lib/templates/nav.html.erb
|
79
84
|
- lib/templates/nav.html.haml
|
80
85
|
- lib/templates/nav.html.slim
|
86
|
+
- lib/templates/uikit_nav.html.erb
|
87
|
+
- lib/templates/uikit_nav.html.haml
|
88
|
+
- lib/templates/uikit_nav.html.slim
|
81
89
|
- pagy.gemspec
|
82
90
|
homepage: https://github.com/ddnexus/pagy
|
83
91
|
licenses:
|
@@ -98,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
98
106
|
- !ruby/object:Gem::Version
|
99
107
|
version: '0'
|
100
108
|
requirements: []
|
101
|
-
rubygems_version: 3.0.
|
109
|
+
rubygems_version: 3.0.6
|
102
110
|
signing_key:
|
103
111
|
specification_version: 4
|
104
112
|
summary: The Ultimate Pagination Ruby Gem
|