pagy 4.5.1 → 4.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 19e29bbf55102d30e9da7d4e6e3e72b838bd4973451ce861e4724fc1824a6cc8
4
- data.tar.gz: 483657a52db974186448c72c3dc071dc754855e9d8bf6963886c6c0600cf8516
3
+ metadata.gz: ef235bc480391503c4c4c9c0af67f8bf10f62aad86270fc0ae67e1bdd76a0044
4
+ data.tar.gz: 18c74230a1e88d4875340b4bff63c181fb95998e63ebf83aac51016e5d16bb68
5
5
  SHA512:
6
- metadata.gz: 41e8776832f9fa255056815fcbae25d066716fd6910cba99eb0a1351807d5e601a1229c1815065a555971f2aa76fca4c9cdee33188ca30e627fb2c7b3afcba64
7
- data.tar.gz: 23a50e3d270c22a4b12fd12ec0a7543db527a939ddf27da19cf2acab8edfe1f9da1f307ba4adab50775c8d8846728d9a2fad39565257df786ea819980fa67885
6
+ metadata.gz: add32ab56092596d562d5e90abfeb87a4c66eb2e4c1f0d3b923e0ffc53c20b03a4edba020ebb8a15efd5e089a9d59b059d0bc4f6496c8836eaa5908e4bb2de68
7
+ data.tar.gz: 268a59ed232635bcf2e41140380b2751bec2bb1ddba2a388ff095f5d8aceda6b455474f46cf069569a83f544c7c983358e9723bdd14c0160ae1b08ba3197be9b
data/lib/config/pagy.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- # Pagy initializer file (4.5.1)
3
+ # Pagy initializer file (4.6.0)
4
4
  # Customize only what you really need and notice that Pagy works also without any of the following lines.
5
5
  # Should you just cherry pick part of this file, please maintain the require-order of the extras
6
6
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  function Pagy(){}
4
4
 
5
- Pagy.version = '4.5.1'
5
+ Pagy.version = '4.6.0'
6
6
 
7
7
  Pagy.delay = 100
8
8
 
data/lib/locales/bg.yml CHANGED
@@ -17,6 +17,6 @@ bg:
17
17
  single_page: "Показани са <b>%{count}</b> %{item_name}"
18
18
  multiple_pages: "Показани са %{item_name} <b>%{from}-%{to}</b> от <b>%{count}</b> общо"
19
19
 
20
- combo_nav_js: "Страница %{page_input} от %{pages}"
20
+ combo_nav_js: "<label>Страница %{page_input}</label> от %{pages}"
21
21
 
22
- items_selector_js: "Покажи %{items_input} %{item_name} на страница"
22
+ items_selector_js: "<label>Покажи %{items_input} %{item_name} на страница</label>"
data/lib/locales/bs.yml CHANGED
@@ -19,6 +19,6 @@ bs:
19
19
  single_page: "Prikazuje se <b>%{count}</b> %{item_name}"
20
20
  multiple_pages: "Prikaz %{item_name} <b>%{from}-%{to}</b> od <b>%{count}</b> ukupno"
21
21
 
22
- combo_nav_js: "Stranica %{page_input} od %{pages}"
22
+ combo_nav_js: "<label>Stranica %{page_input}</label> od %{pages}"
23
23
 
24
- items_selector_js: "Prikaži %{items_input} %{item_name} po stranici"
24
+ items_selector_js: "<label>Prikaži %{items_input} %{item_name} po stranici</label>"
data/lib/locales/ca.yml CHANGED
@@ -17,6 +17,6 @@ ca:
17
17
  single_page: "Mostrant <b>%{count}</b> %{item_name}"
18
18
  multiple_pages: "Mostrant %{item_name} <b>%{from}-%{to}</b> de <b>%{count}</b> en total"
19
19
 
20
- combo_nav_js: "Pàgina %{page_input} de %{pages}"
20
+ combo_nav_js: "<label>Pàgina %{page_input}</label> de %{pages}"
21
21
 
22
- items_selector_js: "Mostra %{items_input} %{item_name} per pàgina"
22
+ items_selector_js: "<label>Mostra %{items_input} %{item_name} per pàgina</label>"
data/lib/locales/cs.yml CHANGED
@@ -17,6 +17,6 @@ cs:
17
17
  single_page: "Zobrazeno <b>%{count}</b> %{item_name}"
18
18
  multiple_pages: "Zobrazeno %{item_name} <b>%{from}-%{to}</b> z <b>%{count}</b> celkem"
19
19
 
20
- combo_nav_js: "Strana %{page_input} z %{pages}"
20
+ combo_nav_js: "<label>Strana %{page_input}</label> z %{pages}"
21
21
 
22
- items_selector_js: "Zobrazit %{items_input} %{item_name} na stránce"
22
+ items_selector_js: "<label>Zobrazit %{items_input} %{item_name} na stránce</label>"
data/lib/locales/da.yml CHANGED
@@ -17,6 +17,6 @@ da:
17
17
  single_page: "Viser <b>%{count}</b> %{item_name}"
18
18
  multiple_pages: "Viser %{item_name} <b>%{from}-%{to}</b> til <b>%{count}</b> totalt"
19
19
 
20
- combo_nav_js: "Side %{page_input} of %{pages}"
20
+ combo_nav_js: "<label>Side %{page_input}</label> of %{pages}"
21
21
 
22
- items_selector_js: "Antal %{items_input} %{item_name} per side"
22
+ items_selector_js: "<label>Antal %{items_input} %{item_name} per side</label>"
data/lib/locales/de.yml CHANGED
@@ -17,6 +17,6 @@ de:
17
17
  single_page: "Zeige <b>%{count}</b> %{item_name}"
18
18
  multiple_pages: "Zeige %{item_name} <b>%{from}-%{to}</b> von <b>%{count}</b> gesamt"
19
19
 
20
- combo_nav_js: "Seite %{page_input} von %{pages}"
20
+ combo_nav_js: "<label>Seite %{page_input}</label> von %{pages}"
21
21
 
22
- items_selector_js: "Zeige %{items_input} %{item_name} pro Seite"
22
+ items_selector_js: "<label>Zeige %{items_input} %{item_name} pro Seite</label>"
data/lib/locales/en.yml CHANGED
@@ -17,6 +17,6 @@ en:
17
17
  single_page: "Displaying <b>%{count}</b> %{item_name}"
18
18
  multiple_pages: "Displaying %{item_name} <b>%{from}-%{to}</b> of <b>%{count}</b> in total"
19
19
 
20
- combo_nav_js: "Page %{page_input} of %{pages}"
20
+ combo_nav_js: "<label>Page %{page_input}</label> of %{pages}"
21
21
 
22
- items_selector_js: "Show %{items_input} %{item_name} per page"
22
+ items_selector_js: "<label>Show %{items_input} %{item_name} per page</label>"
data/lib/locales/es.yml CHANGED
@@ -17,6 +17,6 @@ es:
17
17
  single_page: "Mostrando %{count} %{item_name}"
18
18
  multiple_pages: "Mostrando %{item_name} %{from}-%{to} de %{count} en total"
19
19
 
20
- combo_nav_js: "Página %{page_input} de %{pages}"
20
+ combo_nav_js: "<label>Página %{page_input}</label> de %{pages}"
21
21
 
22
- items_selector_js: "Mostrar %{items_input} %{item_name} por página"
22
+ items_selector_js: "<label>Mostrar %{items_input} %{item_name} por página</label>"
data/lib/locales/fr.yml CHANGED
@@ -17,6 +17,6 @@ fr:
17
17
  single_page: "Affichage de <b>%{count}</b> %{item_name}"
18
18
  multiple_pages: "Affichage des %{item_name} <b>%{from} à %{to}</b> sur <b>%{count}</b> au total"
19
19
 
20
- combo_nav_js: "Page %{page_input} sur %{pages}"
20
+ combo_nav_js: "<label>Page %{page_input}</label> sur %{pages}"
21
21
 
22
- items_selector_js: "Afficher %{items_input} %{item_name} par page"
22
+ items_selector_js: "<label>Afficher %{items_input} %{item_name} par page</label>"
data/lib/locales/hr.yml CHANGED
@@ -19,6 +19,6 @@ hr:
19
19
  single_page: "Prikazuje se <b>%{count}</b> %{item_name}"
20
20
  multiple_pages: "Prikaz %{item_name} <b>%{from}-%{to}</b> od <b>%{count}</b> ukupno"
21
21
 
22
- combo_nav_js: "Stranica %{page_input} od %{pages}"
22
+ combo_nav_js: "<label>Stranica %{page_input}</label> od %{pages}"
23
23
 
24
- items_selector_js: "Prikaži %{items_input} %{item_name} po stranici"
24
+ items_selector_js: "<label>Prikaži %{items_input} %{item_name} po stranici</label>"
data/lib/locales/id.yml CHANGED
@@ -15,6 +15,6 @@ id:
15
15
  single_page: "Menampilkan <b>%{count}</b> %{item_name}"
16
16
  multiple_pages: "Menampilkan %{item_name} <b>%{from}-%{to}</b> dari total <b>%{count}</b>"
17
17
 
18
- combo_nav_js: "Halaman %{page_input} dari %{pages}"
18
+ combo_nav_js: "<label>Halaman %{page_input}</label> dari %{pages}"
19
19
 
20
- items_selector_js: "Tampilkan %{items_input} %{item_name} per halaman"
20
+ items_selector_js: "<label>Tampilkan %{items_input} %{item_name} per halaman</label>"
data/lib/locales/it.yml CHANGED
@@ -17,6 +17,6 @@ it:
17
17
  single_page: "Visualizzazione di <b>%{count}</b> %{item_name}"
18
18
  multiple_pages: "Visualizzazione %{item_name} <b>%{from}-%{to}</b> di <b>%{count}</b> in totale"
19
19
 
20
- combo_nav_js: "Pagina %{page_input} di %{pages}"
20
+ combo_nav_js: "<label>Pagina %{page_input}</label> di %{pages}"
21
21
 
22
- items_selector_js: "Mostra %{items_input} %{item_name} per pagina"
22
+ items_selector_js: "<label>Mostra %{items_input} %{item_name} per pagina</label>"
data/lib/locales/ja.yml CHANGED
@@ -15,6 +15,6 @@ ja:
15
15
  single_page: "<b>%{count}</b> 件の%{item_name}"
16
16
  multiple_pages: "<b>%{count}</b> 件中 <b>%{from}-%{to}</b> 件目の%{item_name}を表示中"
17
17
 
18
- combo_nav_js: "%{page_input} / %{pages} ページ"
18
+ combo_nav_js: "<label>%{page_input}</label> / %{pages} ページ"
19
19
 
20
- items_selector_js: "%{items_input} 件ずつ表示"
20
+ items_selector_js: "<label>%{items_input} 件ずつ表示</label>"
data/lib/locales/km.yml CHANGED
@@ -14,6 +14,6 @@ km:
14
14
  single_page: "បង្ហាញ <b>%{count}</b> %{item_name}"
15
15
  multiple_pages: "បង្ហាញ %{item_name} <b>%{from}-%{to}</b> នៃ <b>%{count}</b> ជាចំនួនសរុប"
16
16
 
17
- combo_nav_js: "ទំព័រ %{page_input} នៃ %{pages}"
17
+ combo_nav_js: "<label>ទំព័រ %{page_input}</label> នៃ %{pages}"
18
18
 
19
- items_selector_js: "បង្ហាញ %{items_input} %{item_name} ក្នុង ១ ទំព័រ"
19
+ items_selector_js: "<label>បង្ហាញ %{items_input} %{item_name} ក្នុង ១ ទំព័រ</label>"
data/lib/locales/ko.yml CHANGED
@@ -15,6 +15,6 @@ ko:
15
15
  single_page: "<b>%{count}</b>개의 %{item_name} 표시됨"
16
16
  multiple_pages: "총 <b>%{count}</b>개의 %{item_name} 중 <b>%{from}-%{to}</b>"
17
17
 
18
- combo_nav_js: " %{pages} 중 %{page_input} 페이지"
18
+ combo_nav_js: "<label>총 %{pages} 중 %{page_input}</label> 페이지"
19
19
 
20
- items_selector_js: "페이지 당 %{items_input}개 표시%"
20
+ items_selector_js: "<label>페이지 당 %{items_input}개 표시%</label>"
data/lib/locales/nb.yml CHANGED
@@ -17,6 +17,6 @@ nb:
17
17
  single_page: "Viser <b>%{count}</b> %{item_name}"
18
18
  multiple_pages: "Viser %{item_name} <b>%{from}-%{to}</b> av totalt <b>%{count}</b>"
19
19
 
20
- combo_nav_js: "Side %{page_input} av %{pages}"
20
+ combo_nav_js: "<label>Side %{page_input}</label> av %{pages}"
21
21
 
22
- items_selector_js: "Vis %{items_input} %{item_name} per side"
22
+ items_selector_js: "<label>Vis %{items_input} %{item_name} per side</label>"
data/lib/locales/nl.yml CHANGED
@@ -17,6 +17,6 @@ nl:
17
17
  single_page: "Toont <b>%{count}</b> %{item_name}"
18
18
  multiple_pages: "Toont <b>%{from}-%{to}</b> %{item_name} van <b>%{count}</b> in totaal"
19
19
 
20
- combo_nav_js: "Pagina %{page_input} van %{pages}"
20
+ combo_nav_js: "<label>Pagina %{page_input}</label> van %{pages}"
21
21
 
22
- items_selector_js: "Toont %{items_input} %{item_name} per pagina"
22
+ items_selector_js: "<label>Toont %{items_input} %{item_name} per pagina</label>"
data/lib/locales/pl.yml CHANGED
@@ -19,6 +19,6 @@ pl:
19
19
  single_page: "Wyświetlono <b>%{count}</b> %{item_name}"
20
20
  multiple_pages: "Wyświetlono %{item_name} <b>%{from}-%{to}</b> z wszystkich <b>%{count}</b>"
21
21
 
22
- combo_nav_js: "Strona %{page_input} z %{pages}"
22
+ combo_nav_js: "<label>Strona %{page_input}</label> z %{pages}"
23
23
 
24
- items_selector_js: "Pokaż %{items_input} %{item_name} na stronie"
24
+ items_selector_js: "<label>Pokaż %{items_input} %{item_name} na stronie</label>"
@@ -17,6 +17,6 @@ pt-BR:
17
17
  single_page: "Mostrando %{count} %{item_name}"
18
18
  multiple_pages: "Mostrando %{item_name} %{from}-%{to} do total de %{count}"
19
19
 
20
- combo_nav_js: "Página %{page_input} de %{pages}"
20
+ combo_nav_js: "<label>Página %{page_input}</label> de %{pages}"
21
21
 
22
- items_selector_js: "Mostrar %{items_input} %{item_name} por página"
22
+ items_selector_js: "<label>Mostrar %{items_input} %{item_name} por página</label>"
data/lib/locales/pt.yml CHANGED
@@ -17,6 +17,6 @@ pt:
17
17
  single_page: "Mostrando %{count} %{item_name}"
18
18
  multiple_pages: "Mostrando %{item_name} %{from}-%{to} de um total de %{count}"
19
19
 
20
- combo_nav_js: "Página %{page_input} de %{pages}"
20
+ combo_nav_js: "<label>Página %{page_input}</label> de %{pages}"
21
21
 
22
- items_selector_js: "Mostrar %{items_input} %{item_name} por página"
22
+ items_selector_js: "<label>Mostrar %{items_input} %{item_name} por página</label>"
data/lib/locales/ru.yml CHANGED
@@ -19,6 +19,6 @@ ru:
19
19
  single_page: "<b>%{count}</b> %{item_name}"
20
20
  multiple_pages: "Всего <b>%{count}</b> %{item_name}, показаны с <b>%{from}</b> по <b>%{to}</b>"
21
21
 
22
- combo_nav_js: "Страница %{page_input} из %{pages}"
22
+ combo_nav_js: "<label>Страница %{page_input}</label> из %{pages}"
23
23
 
24
- items_selector_js: "Показать %{items_input} %{item_name} на странице"
24
+ items_selector_js: "<label>Показать %{items_input} %{item_name} на странице</label>"
data/lib/locales/sr.yml CHANGED
@@ -18,6 +18,6 @@ sr:
18
18
  single_page: "Приказује се <b>%{count}</b> %{item_name}"
19
19
  multiple_pages: "Приказ %{item_name} <b>%{from}-%{to}</b> од <b>%{count}</b> укупно"
20
20
 
21
- combo_nav_js: "Страниca %{page_input} од %{pages}"
21
+ combo_nav_js: "<label>Страниca %{page_input}</label> од %{pages}"
22
22
 
23
- items_selector_js: "Прикажи %{items_input} %{item_name} по страниcи"
23
+ items_selector_js: "<label>Прикажи %{items_input} %{item_name} по страниcи</label>"
@@ -18,6 +18,6 @@ sv-SE:
18
18
  single_page: "Visar <b>%{count}</b> %{item_name}"
19
19
  multiple_pages: "Visar %{item_name} <b>%{from}-%{to}</b> av <b>%{count}</b> totalt"
20
20
 
21
- combo_nav_js: "Sida %{page_input} av %{pages}"
21
+ combo_nav_js: "<label>Sida %{page_input}</label> av %{pages}"
22
22
 
23
- items_selector_js: "Visa %{items_input} %{item_name} per sida"
23
+ items_selector_js: "<label>Visa %{items_input} %{item_name} per sida</label>"
data/lib/locales/sv.yml CHANGED
@@ -18,6 +18,6 @@ sv:
18
18
  single_page: "Visar <b>%{count}</b> %{item_name}"
19
19
  multiple_pages: "Visar %{item_name} <b>%{from}-%{to}</b> av <b>%{count}</b> totalt"
20
20
 
21
- combo_nav_js: "Sida %{page_input} av %{pages}"
21
+ combo_nav_js: "<label>Sida %{page_input}</label> av %{pages}"
22
22
 
23
- items_selector_js: "Visa %{items_input} %{item_name} per sida"
23
+ items_selector_js: "<label>Visa %{items_input} %{item_name} per sida</label>"
data/lib/locales/sw.yml CHANGED
@@ -17,6 +17,6 @@ sw:
17
17
  single_page: "Inaonyesha %{item_name} <b>%{count}</b>"
18
18
  multiple_pages: "Inaonyesha %{item_name} <b>%{from}-%{to}</b> ya <b>%{count}</b> kwa jumla"
19
19
 
20
- combo_nav_js: "Kurasa %{page_input} ya %{pages}"
20
+ combo_nav_js: "<label>Kurasa %{page_input}</label> ya %{pages}"
21
21
 
22
- items_selector_js: "Onyesha %{items_input} %{item_name} kwa kila ukurasa"
22
+ items_selector_js: "<label>Onyesha %{items_input} %{item_name} kwa kila ukurasa</label>"
data/lib/locales/tr.yml CHANGED
@@ -15,6 +15,6 @@ tr:
15
15
  single_page: "Toplam <b>%{count}</b> %{item_name} gösteriliyor"
16
16
  multiple_pages: "<b>%{count}</b> %{item_name} içerisinden <b>%{from}-%{to}</b> kadarı gösteriliyor"
17
17
 
18
- combo_nav_js: "Sayfa %{page_input} / %{pages}"
18
+ combo_nav_js: "<label>Sayfa %{page_input}</label> / %{pages}"
19
19
 
20
- items_selector_js: "Sayfada %{items_input} %{item_name} göster"
20
+ items_selector_js: "<label>Sayfada %{items_input} %{item_name} göster</label>"
@@ -15,6 +15,6 @@ zh-CN:
15
15
  single_page: "显示<b>%{count}</b> 项%{item_name}"
16
16
  multiple_pages: "共 <b>%{count}</b> 项%{item_name},显示 <b>%{from}-%{to}</b>"
17
17
 
18
- combo_nav_js: " %{page_input} / %{pages} 页"
18
+ combo_nav_js: "<label>第 %{page_input}</label> / %{pages} 页"
19
19
 
20
- items_selector_js: "每页显示 %{items_input} 条%"
20
+ items_selector_js: "<label>每页显示 %{items_input} 条%</label>"
@@ -15,6 +15,6 @@ zh-HK:
15
15
  single_page: "顯示 <b>%{count}</b> %{item_name}"
16
16
  multiple_pages: "共 <b>%{count}</b> %{item_name},顯示 <b>%{from}-%{to}</b>"
17
17
 
18
- combo_nav_js: " %{page_input} / %{pages} 頁"
18
+ combo_nav_js: "<label>第 %{page_input}</label> / %{pages} 頁"
19
19
 
20
- items_selector_js: "每頁顯示 %{items_input} 記錄"
20
+ items_selector_js: "<label>每頁顯示 %{items_input} 記錄</label>"
@@ -10,11 +10,11 @@ zh-TW:
10
10
  next: "下一頁&nbsp;&rsaquo;"
11
11
  gap: "&hellip;"
12
12
 
13
- combo_nav_js: "第 %{page_input} / %{pages} 頁"
14
-
15
13
  info:
16
14
  no_items: "沒找到項"
17
15
  single_page: "顯示 <b>%{count}</b> 項%{item_name}"
18
16
  multiple_pages: "共 <b>%{count}</b> 項%{item_name},顯示 <b>%{from}-%{to}</b>"
19
17
 
20
- items_selector_js: "每頁顯示 %{items_input} 項%{item_name}"
18
+ combo_nav_js: "<label>第 %{page_input}</label> / %{pages}"
19
+
20
+ items_selector_js: "<label>每頁顯示 %{items_input} 項%{item_name}"
data/lib/pagy.rb CHANGED
@@ -5,7 +5,7 @@ require 'pathname'
5
5
 
6
6
  # main class
7
7
  class Pagy
8
- VERSION = '4.5.1'
8
+ VERSION = '4.6.0'
9
9
 
10
10
  # Root pathname to get the path of Pagy files like templates or dictionaries
11
11
  def self.root
@@ -11,7 +11,7 @@ class Pagy
11
11
  p_id = %( id="#{pagy_id}") if pagy_id
12
12
  link = pagy_link_proc(pagy, link_extra: %(class="page-link" #{link_extra}))
13
13
 
14
- html = +%(<nav#{p_id} class="pagy-bootstrap-nav" role="navigation" aria-label="pager"><ul class="pagination">)
14
+ html = +%(<nav#{p_id} class="pagy-bootstrap-nav" aria-label="pager"><ul class="pagination">)
15
15
  html << pagy_bootstrap_prev_html(pagy, link)
16
16
  pagy.series.each do |item| # series example: [1, :gap, 7, 8, "9", 10, 11, :gap, 36]
17
17
  html << case item
@@ -35,7 +35,7 @@ class Pagy
35
35
  'gap' => %(<li class="page-item gap disabled"><a href="#" class="page-link">#{pagy_t 'pagy.nav.gap'}</a></li>),
36
36
  'after' => %(#{pagy_bootstrap_next_html pagy, link}</ul>) }
37
37
 
38
- html = %(<nav#{p_id} class="pagy-njs pagy-bootstrap-nav-js" role="navigation" aria-label="pager"></nav>)
38
+ html = %(<nav#{p_id} class="pagy-njs pagy-bootstrap-nav-js" aria-label="pager"></nav>)
39
39
  html << pagy_json_tag(pagy, :nav, tags, pagy.sequels(steps))
40
40
  end
41
41
 
@@ -48,7 +48,7 @@ class Pagy
48
48
  p_pages = pagy.pages
49
49
  input = %(<input type="number" min="1" max="#{p_pages}" value="#{p_page}" class="text-primary" style="padding: 0; border: none; text-align: center; width: #{p_pages.to_s.length+1}rem;">)
50
50
 
51
- %(<nav#{p_id} class="pagy-bootstrap-combo-nav-js pagination" role="navigation" aria-label="pager"><div class="btn-group" role="group">#{
51
+ %(<nav#{p_id} class="pagy-bootstrap-combo-nav-js pagination" aria-label="pager"><div class="btn-group" role="group">#{
52
52
  if (p_prev = pagy.prev)
53
53
  link.call p_prev, pagy_t('pagy.nav.prev'), 'aria-label="previous" class="prev btn btn-primary"'
54
54
  else
@@ -11,7 +11,7 @@ class Pagy
11
11
  p_id = %( id="#{pagy_id}") if pagy_id
12
12
  link = pagy_link_proc(pagy, link_extra: link_extra)
13
13
 
14
- html = +%(<nav#{p_id} class="pagy-bulma-nav pagination is-centered" role="navigation" aria-label="pagination">)
14
+ html = +%(<nav#{p_id} class="pagy-bulma-nav pagination is-centered" aria-label="pagination">)
15
15
  html << pagy_bulma_prev_next_html(pagy, link)
16
16
  html << %(<ul class="pagination-list">)
17
17
  pagy.series.each do |item| # series example: [1, :gap, 7, 8, "9", 10, 11, :gap, 36]
@@ -34,7 +34,7 @@ class Pagy
34
34
  'gap' => %(<li><span class="pagination-ellipsis">#{pagy_t 'pagy.nav.gap' }</span></li>),
35
35
  'after' => '</ul>' }
36
36
 
37
- html = %(<nav#{p_id} class="pagy-njs pagy-bulma-nav-js pagination is-centered" role="navigation" aria-label="pagination"></nav>)
37
+ html = %(<nav#{p_id} class="pagy-njs pagy-bulma-nav-js pagination is-centered" aria-label="pagination"></nav>)
38
38
  html << pagy_json_tag(pagy, :nav, tags, pagy.sequels(steps))
39
39
  end
40
40
 
@@ -47,7 +47,7 @@ class Pagy
47
47
  p_pages = pagy.pages
48
48
  input = %(<input class="input" type="number" min="1" max="#{p_pages}" value="#{p_page}" style="padding: 0; text-align: center; width: #{p_pages.to_s.length+1}rem; margin:0 0.3rem;">)
49
49
 
50
- %(<nav#{p_id} class="pagy-bulma-combo-nav-js" role="navigation" aria-label="pagination"><div class="field is-grouped is-grouped-centered" role="group">#{
50
+ %(<nav#{p_id} class="pagy-bulma-combo-nav-js" aria-label="pagination"><div class="field is-grouped is-grouped-centered" role="group">#{
51
51
  if (p_prev = pagy.prev)
52
52
  %(<p class="control">#{link.call p_prev, pagy_t('pagy.nav.prev'), 'class="button" aria-label="previous page"'}</p>)
53
53
  else
@@ -11,7 +11,7 @@ class Pagy
11
11
  p_id = %( id="#{pagy_id}") if pagy_id
12
12
  link = pagy_link_proc(pagy, link_extra: link_extra)
13
13
 
14
- html = +%(<nav#{p_id} class="pagy-foundation-nav" role="navigation" aria-label="Pagination"><ul class="pagination">)
14
+ html = +%(<nav#{p_id} class="pagy-foundation-nav" aria-label="Pagination"><ul class="pagination">)
15
15
  html << pagy_foundation_prev_html(pagy, link)
16
16
  pagy.series.each do |item| # series example: [1, :gap, 7, 8, "9", 10, 11, :gap, 36]
17
17
  html << case item
@@ -35,7 +35,7 @@ class Pagy
35
35
  'gap' => %(<li class="ellipsis gap" aria-hidden="true"></li>),
36
36
  'after' => %(#{pagy_foundation_next_html pagy, link}</ul>) }
37
37
 
38
- html = %(<nav#{p_id} class="pagy-njs pagy-foundation-nav-js" role="navigation" aria-label="Pagination"></nav>)
38
+ html = %(<nav#{p_id} class="pagy-njs pagy-foundation-nav-js" aria-label="Pagination"></nav>)
39
39
  html << pagy_json_tag(pagy, :nav, tags, pagy.sequels(steps))
40
40
  end
41
41
 
@@ -48,17 +48,17 @@ class Pagy
48
48
  p_pages = pagy.pages
49
49
  input = %(<input class="input-group-field cell shrink" type="number" min="1" max="#{p_pages}" value="#{p_page}" style="width: #{p_pages.to_s.length+1}rem; padding: 0 0.3rem; margin: 0 0.3rem;">)
50
50
 
51
- %(<nav#{p_id} class="pagy-foundation-combo-nav-js" role="navigation" aria-label="Pagination"><div class="input-group">#{
51
+ %(<nav#{p_id} class="pagy-foundation-combo-nav-js" aria-label="Pagination"><div class="input-group">#{
52
52
  if (p_prev = pagy.prev)
53
- link.call p_prev, pagy_t('pagy.nav.prev'), 'style="margin-bottom: 0px;" aria-label="previous" class="prev button primary"'
53
+ link.call p_prev, pagy_t('pagy.nav.prev'), 'style="margin-bottom: 0" aria-label="previous" class="prev button primary"'
54
54
  else
55
- %(<a style="margin-bottom: 0px;" class="prev button primary disabled" href="#">#{pagy_t 'pagy.nav.prev'}</a>)
55
+ %(<a style="margin-bottom: 0" class="prev button primary disabled" href="#">#{pagy_t 'pagy.nav.prev'}</a>)
56
56
  end
57
57
  }<span class="input-group-label">#{pagy_t 'pagy.combo_nav_js', page_input: input, count: p_page, pages: p_pages}</span>#{
58
58
  if (p_next = pagy.next)
59
- link.call p_next, pagy_t('pagy.nav.next'), 'style="margin-bottom: 0px;" aria-label="next" class="next button primary"'
59
+ link.call p_next, pagy_t('pagy.nav.next'), 'style="margin-bottom: 0" aria-label="next" class="next button primary"'
60
60
  else
61
- %(<a style="margin-bottom: 0px;" class="next button primary disabled" href="#">#{pagy_t 'pagy.nav.next'}</a>)
61
+ %(<a style="margin-bottom: 0" class="next button primary disabled" href="#">#{pagy_t 'pagy.nav.next'}</a>)
62
62
  end
63
63
  }</div></nav>#{
64
64
  pagy_json_tag pagy, :combo_nav, p_page, pagy_marked_link(link)
@@ -50,7 +50,7 @@ class Pagy
50
50
  style = ' style="vertical-align: middle;"'
51
51
  input = %(<input type="number" class="browser-default" min="1" max="#{p_pages}" value="#{p_page}" style="padding: 2px; border: none; border-radius: 2px; text-align: center; width: #{p_pages.to_s.length+1}rem;">)
52
52
 
53
- %(<div#{p_id} class="pagy-materialize-combo-nav-js pagination" role="navigation" aria-label="pager"><div class="pagy-compact-chip role="group" style="height: 35px; border-radius: 18px; background: #e4e4e4; display: inline-block;"><ul class="pagination" style="margin: 0px;">#{
53
+ %(<div#{p_id} class="pagy-materialize-combo-nav-js pagination" role="navigation" aria-label="pager"><div class="pagy-compact-chip" role="group" style="height: 35px; border-radius: 18px; background: #e4e4e4; display: inline-block;"><ul class="pagination" style="margin: 0">#{
54
54
  pagy_materialize_prev_html pagy, link, style
55
55
  }<div class="pagy-combo-input btn-flat" style="cursor: default; padding: 0px">#{
56
56
  pagy_t 'pagy.combo_nav_js', page_input: input, count: p_page, pages: p_pages
@@ -17,7 +17,7 @@ class Pagy
17
17
  'gap' => %(<span class="page gap">#{pagy_t 'pagy.nav.gap'}</span> ),
18
18
  'after' => pagy_nav_next_html(pagy, link) }
19
19
 
20
- html = %(<nav#{p_id} class="pagy-njs pagy-nav-js pagination" role="navigation" aria-label="pager"></nav>)
20
+ html = %(<nav#{p_id} class="pagy-njs pagy-nav-js pagination" aria-label="pager"></nav>)
21
21
  html << pagy_json_tag(pagy, :nav, tags, pagy.sequels(steps))
22
22
  end
23
23
 
@@ -30,7 +30,7 @@ class Pagy
30
30
  p_pages = pagy.pages
31
31
  input = %(<input type="number" min="1" max="#{p_pages}" value="#{p_page}" style="padding: 0; text-align: center; width: #{p_pages.to_s.length+1}rem;">)
32
32
 
33
- %(<nav#{p_id} class="pagy-combo-nav-js pagination" role="navigation" aria-label="pager">#{
33
+ %(<nav#{p_id} class="pagy-combo-nav-js pagination" aria-label="pager">#{
34
34
  pagy_nav_prev_html pagy, link
35
35
  }<span class="pagy-combo-input" style="margin: 0 0.6rem;">#{
36
36
  pagy_t 'pagy.combo_nav_js', page_input: input, count: p_page, pages: p_pages
@@ -9,9 +9,9 @@ class Pagy
9
9
  # Pagination for semantic: it returns the html with the series of links to the pages
10
10
  def pagy_semantic_nav(pagy, pagy_id: nil, link_extra: '')
11
11
  p_id = %( id="#{pagy_id}") if pagy_id
12
- link = pagy_link_proc(pagy, link_extra: %(class="item" #{link_extra}"))
12
+ link = pagy_link_proc(pagy, link_extra: %(class="item" #{link_extra}))
13
13
 
14
- html = +%(<div#{p_id} class="pagy-semantic-nav ui pagination menu" aria-label="pager">)
14
+ html = +%(<div#{p_id} class="pagy-semantic-nav ui pagination menu">)
15
15
  html << pagy_semantic_prev_html(pagy, link)
16
16
  pagy.series.each do |item| # series example: [1, :gap, 7, 8, "9", 10, 11, :gap, 36]
17
17
  html << case item
@@ -35,7 +35,7 @@ class Pagy
35
35
  'gap' => %(<div class="disabled item">#{pagy_t('pagy.nav.gap')}</div>),
36
36
  'after' => pagy_semantic_next_html(pagy, link) }
37
37
 
38
- html = %(<div#{p_id} class="pagy-njs pagy-semantic-nav-js ui pagination menu" role="navigation" aria-label="pager"></div>)
38
+ html = %(<div#{p_id} class="pagy-njs pagy-semantic-nav-js ui pagination menu" role="navigation"></div>)
39
39
  html << pagy_json_tag(pagy, :nav, tags, pagy.sequels(steps))
40
40
  end
41
41
 
@@ -48,7 +48,7 @@ class Pagy
48
48
  p_pages = pagy.pages
49
49
  input = %(<input type="number" min="1" max="#{p_pages}" value="#{p_page}" style="padding: 0; text-align: center; width: #{p_pages.to_s.length+1}rem; margin: 0 0.3rem">)
50
50
 
51
- %(<div#{p_id} class="pagy-semantic-combo-nav-js ui compact menu" role="navigation" aria-label="pager">#{
51
+ %(<div#{p_id} class="pagy-semantic-combo-nav-js ui compact menu" role="navigation">#{
52
52
  pagy_semantic_prev_html pagy, link
53
53
  }<div class="pagy-combo-input item">#{
54
54
  pagy_t 'pagy.combo_nav_js', page_input: input, count: p_page, pages: p_pages
data/lib/pagy/frontend.rb CHANGED
@@ -41,7 +41,7 @@ class Pagy
41
41
  p_prev = pagy.prev
42
42
  p_next = pagy.next
43
43
 
44
- html = +%(<nav#{p_id} class="pagy-nav pagination" role="navigation" aria-label="pager">)
44
+ html = +%(<nav#{p_id} class="pagy-nav pagination" aria-label="pager">)
45
45
  html << if p_prev
46
46
  %(<span class="page prev">#{link.call p_prev, pagy_t('pagy.nav.prev'), 'aria-label="previous"'}</span> )
47
47
  else
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: 4.5.1
4
+ version: 4.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: 2021-05-02 00:00:00.000000000 Z
11
+ date: 2021-05-09 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,