Skip to content

Commit

Permalink
Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnexus committed May 9, 2021
2 parents 58f4150 + 1b83ad3 commit 0c0d013
Show file tree
Hide file tree
Showing 67 changed files with 10,454 additions and 256 deletions.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
/coverage/
/docs/.jekyll-metadata
/pkg/
/test/e2e/cypress/videos/
/test/e2e/cypress/downloads/
/test/e2e/cypress/fixtures/
/test/e2e/cypress/screenshots/
/test/e2e/cypress/videos/
/tmp/
30 changes: 29 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,34 @@
# CHANGELOG

### Version 4.5.1
## Version 4.6.0

### Changes

- Added labels to all input tags for improved usability and compliance
- Fixed a few HTML typos and rendundant or illegal attributes
- Improved Sinatra app usable for experiment with pagy and providing support for ode issues
- Documentation inprovements
- Added E2E testing for all pagy helpers
- GitHub management improvements

### Commits

- [0fe2e49](http://github.com/ddnexus/pagy/commit/0fe2e49): added helpers and navbar tests for all the styles; updated docker readme
- [26b57a8](http://github.com/ddnexus/pagy/commit/26b57a8): Added fix for Cypress bug affecting the snapshots plugin, improved cypress dockerfiles; added cypress studio and basic try
- [7693b3e](http://github.com/ddnexus/pagy/commit/7693b3e): cypress: updated images; better open-cypress.yml with persistent configuration settings; added snapshots plugin
- [94e262f](http://github.com/ddnexus/pagy/commit/94e262f): added label tag to the pagy inputs
- [f5e3482](http://github.com/ddnexus/pagy/commit/f5e3482): removed redundant role="navigation" attribute from nav tags; removed illegal aria-label="pager" from semantic div
- [0467d32](http://github.com/ddnexus/pagy/commit/0467d32): fixes for html typos in semantic, foundation and materialize helpers
- [3f2c9f0](http://github.com/ddnexus/pagy/commit/3f2c9f0): doc small fixes
- [bff8c5f](http://github.com/ddnexus/pagy/commit/bff8c5f): refactoring of sinatra apps; added quick-start doc section
- [b0baaa5](http://github.com/ddnexus/pagy/commit/b0baaa5): simplified standalone_app.ru
- [5442b34](http://github.com/ddnexus/pagy/commit/5442b34): fix broken link [ci skip]
- [17b1faf](http://github.com/ddnexus/pagy/commit/17b1faf): improved issue template [ci skip]
- [f933cd7](http://github.com/ddnexus/pagy/commit/f933cd7): Added issue template and standalone_app to use as a scaffold for reproducing issues [ci skip]
- [c8e41e3](http://github.com/ddnexus/pagy/commit/c8e41e3): added superails screencast; resized thumbnails [skip ci]
- [6116c32](http://github.com/ddnexus/pagy/commit/6116c32): added a few references in the how_to doc [skip ci]

## Version 4.5.1

### Changes

Expand Down
4 changes: 2 additions & 2 deletions docs/how-to.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ Pagy works out of the box in a web app assuming that:

### Non Rack Environments apps/API

- Require the [standalone extra](extras/standalone.md), and pass a `:url` variable and you can use it without Rack in your app or exotic API, with or without the other extra you might need. You can even use every feature/helper right in the irb/rails console.
- Require the [standalone extra](extras/standalone.md), and pass a `:url` variable and you can use it without Rack in your app or exotic API, with or without the other extras you might need. You can even use every feature/helper right in the irb/rails console.
- Besides Rack the other assumptions above apply

### Any other scenario assumptions
Expand Down Expand Up @@ -349,7 +349,7 @@ Pagy provides a few frontend extras for [bootstrap](extras/bootstrap.md), [bulma
If you need to further customize the provided styles, you don't necessary need to override the helpers/templates. Here are a few alternatives:

- define the CSS styles to apply to the pagy CSS classes
- when sass/scss is available: extend the pagy CSS classes with some framework defined class, using the `@extend` sass/scss directive
- if sass/scss is available: extend the pagy CSS classes with some framework defined class, using the `@extend` sass/scss directive
- use the jQuery `addClass` method
- use a couple of lines of plain javascript

Expand Down
2 changes: 1 addition & 1 deletion lib/config/pagy.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# frozen_string_literal: true

# Pagy initializer file (4.5.1)
# Pagy initializer file (4.6.0)
# Customize only what you really need and notice that Pagy works also without any of the following lines.
# Should you just cherry pick part of this file, please maintain the require-order of the extras

Expand Down
2 changes: 1 addition & 1 deletion lib/javascripts/pagy.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

function Pagy(){}

Pagy.version = '4.5.1'
Pagy.version = '4.6.0'

Pagy.delay = 100

Expand Down
4 changes: 2 additions & 2 deletions lib/locales/bg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ bg:
single_page: "Показани са <b>%{count}</b> %{item_name}"
multiple_pages: "Показани са %{item_name} <b>%{from}-%{to}</b> от <b>%{count}</b> общо"

combo_nav_js: "Страница %{page_input} от %{pages}"
combo_nav_js: "<label>Страница %{page_input}</label> от %{pages}"

items_selector_js: "Покажи %{items_input} %{item_name} на страница"
items_selector_js: "<label>Покажи %{items_input} %{item_name} на страница</label>"
4 changes: 2 additions & 2 deletions lib/locales/bs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ bs:
single_page: "Prikazuje se <b>%{count}</b> %{item_name}"
multiple_pages: "Prikaz %{item_name} <b>%{from}-%{to}</b> od <b>%{count}</b> ukupno"

combo_nav_js: "Stranica %{page_input} od %{pages}"
combo_nav_js: "<label>Stranica %{page_input}</label> od %{pages}"

items_selector_js: "Prikaži %{items_input} %{item_name} po stranici"
items_selector_js: "<label>Prikaži %{items_input} %{item_name} po stranici</label>"
4 changes: 2 additions & 2 deletions lib/locales/ca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ ca:
single_page: "Mostrant <b>%{count}</b> %{item_name}"
multiple_pages: "Mostrant %{item_name} <b>%{from}-%{to}</b> de <b>%{count}</b> en total"

combo_nav_js: "Pàgina %{page_input} de %{pages}"
combo_nav_js: "<label>Pàgina %{page_input}</label> de %{pages}"

items_selector_js: "Mostra %{items_input} %{item_name} per pàgina"
items_selector_js: "<label>Mostra %{items_input} %{item_name} per pàgina</label>"
4 changes: 2 additions & 2 deletions lib/locales/cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ cs:
single_page: "Zobrazeno <b>%{count}</b> %{item_name}"
multiple_pages: "Zobrazeno %{item_name} <b>%{from}-%{to}</b> z <b>%{count}</b> celkem"

combo_nav_js: "Strana %{page_input} z %{pages}"
combo_nav_js: "<label>Strana %{page_input}</label> z %{pages}"

items_selector_js: "Zobrazit %{items_input} %{item_name} na stránce"
items_selector_js: "<label>Zobrazit %{items_input} %{item_name} na stránce</label>"
4 changes: 2 additions & 2 deletions lib/locales/da.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ da:
single_page: "Viser <b>%{count}</b> %{item_name}"
multiple_pages: "Viser %{item_name} <b>%{from}-%{to}</b> til <b>%{count}</b> totalt"

combo_nav_js: "Side %{page_input} of %{pages}"
combo_nav_js: "<label>Side %{page_input}</label> of %{pages}"

items_selector_js: "Antal %{items_input} %{item_name} per side"
items_selector_js: "<label>Antal %{items_input} %{item_name} per side</label>"
4 changes: 2 additions & 2 deletions lib/locales/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ de:
single_page: "Zeige <b>%{count}</b> %{item_name}"
multiple_pages: "Zeige %{item_name} <b>%{from}-%{to}</b> von <b>%{count}</b> gesamt"

combo_nav_js: "Seite %{page_input} von %{pages}"
combo_nav_js: "<label>Seite %{page_input}</label> von %{pages}"

items_selector_js: "Zeige %{items_input} %{item_name} pro Seite"
items_selector_js: "<label>Zeige %{items_input} %{item_name} pro Seite</label>"
4 changes: 2 additions & 2 deletions lib/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ en:
single_page: "Displaying <b>%{count}</b> %{item_name}"
multiple_pages: "Displaying %{item_name} <b>%{from}-%{to}</b> of <b>%{count}</b> in total"

combo_nav_js: "Page %{page_input} of %{pages}"
combo_nav_js: "<label>Page %{page_input}</label> of %{pages}"

items_selector_js: "Show %{items_input} %{item_name} per page"
items_selector_js: "<label>Show %{items_input} %{item_name} per page</label>"
4 changes: 2 additions & 2 deletions lib/locales/es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ es:
single_page: "Mostrando %{count} %{item_name}"
multiple_pages: "Mostrando %{item_name} %{from}-%{to} de %{count} en total"

combo_nav_js: "Página %{page_input} de %{pages}"
combo_nav_js: "<label>Página %{page_input}</label> de %{pages}"

items_selector_js: "Mostrar %{items_input} %{item_name} por página"
items_selector_js: "<label>Mostrar %{items_input} %{item_name} por página</label>"
4 changes: 2 additions & 2 deletions lib/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ fr:
single_page: "Affichage de <b>%{count}</b> %{item_name}"
multiple_pages: "Affichage des %{item_name} <b>%{from} à %{to}</b> sur <b>%{count}</b> au total"

combo_nav_js: "Page %{page_input} sur %{pages}"
combo_nav_js: "<label>Page %{page_input}</label> sur %{pages}"

items_selector_js: "Afficher %{items_input} %{item_name} par page"
items_selector_js: "<label>Afficher %{items_input} %{item_name} par page</label>"
4 changes: 2 additions & 2 deletions lib/locales/hr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ hr:
single_page: "Prikazuje se <b>%{count}</b> %{item_name}"
multiple_pages: "Prikaz %{item_name} <b>%{from}-%{to}</b> od <b>%{count}</b> ukupno"

combo_nav_js: "Stranica %{page_input} od %{pages}"
combo_nav_js: "<label>Stranica %{page_input}</label> od %{pages}"

items_selector_js: "Prikaži %{items_input} %{item_name} po stranici"
items_selector_js: "<label>Prikaži %{items_input} %{item_name} po stranici</label>"
4 changes: 2 additions & 2 deletions lib/locales/id.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ id:
single_page: "Menampilkan <b>%{count}</b> %{item_name}"
multiple_pages: "Menampilkan %{item_name} <b>%{from}-%{to}</b> dari total <b>%{count}</b>"

combo_nav_js: "Halaman %{page_input} dari %{pages}"
combo_nav_js: "<label>Halaman %{page_input}</label> dari %{pages}"

items_selector_js: "Tampilkan %{items_input} %{item_name} per halaman"
items_selector_js: "<label>Tampilkan %{items_input} %{item_name} per halaman</label>"
4 changes: 2 additions & 2 deletions lib/locales/it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ it:
single_page: "Visualizzazione di <b>%{count}</b> %{item_name}"
multiple_pages: "Visualizzazione %{item_name} <b>%{from}-%{to}</b> di <b>%{count}</b> in totale"

combo_nav_js: "Pagina %{page_input} di %{pages}"
combo_nav_js: "<label>Pagina %{page_input}</label> di %{pages}"

items_selector_js: "Mostra %{items_input} %{item_name} per pagina"
items_selector_js: "<label>Mostra %{items_input} %{item_name} per pagina</label>"
4 changes: 2 additions & 2 deletions lib/locales/ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ ja:
single_page: "<b>%{count}</b> 件の%{item_name}"
multiple_pages: "<b>%{count}</b> 件中 <b>%{from}-%{to}</b> 件目の%{item_name}を表示中"

combo_nav_js: "%{page_input} / %{pages} ページ"
combo_nav_js: "<label>%{page_input}</label> / %{pages} ページ"

items_selector_js: "%{items_input} 件ずつ表示"
items_selector_js: "<label>%{items_input} 件ずつ表示</label>"
4 changes: 2 additions & 2 deletions lib/locales/km.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ km:
single_page: "បង្ហាញ <b>%{count}</b> %{item_name}"
multiple_pages: "បង្ហាញ %{item_name} <b>%{from}-%{to}</b> នៃ <b>%{count}</b> ជាចំនួនសរុប"

combo_nav_js: "ទំព័រ %{page_input} នៃ %{pages}"
combo_nav_js: "<label>ទំព័រ %{page_input}</label> នៃ %{pages}"

items_selector_js: "បង្ហាញ %{items_input} %{item_name} ក្នុង ១ ទំព័រ"
items_selector_js: "<label>បង្ហាញ %{items_input} %{item_name} ក្នុង ១ ទំព័រ</label>"
4 changes: 2 additions & 2 deletions lib/locales/ko.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ ko:
single_page: "<b>%{count}</b>개의 %{item_name} 표시됨"
multiple_pages: "총 <b>%{count}</b>개의 %{item_name} 중 <b>%{from}-%{to}</b>"

combo_nav_js: "총 %{pages} 중 %{page_input} 페이지"
combo_nav_js: "<label>총 %{pages} 중 %{page_input}</label> 페이지"

items_selector_js: "페이지 당 %{items_input}개 표시%"
items_selector_js: "<label>페이지 당 %{items_input}개 표시%</label>"
4 changes: 2 additions & 2 deletions lib/locales/nb.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ nb:
single_page: "Viser <b>%{count}</b> %{item_name}"
multiple_pages: "Viser %{item_name} <b>%{from}-%{to}</b> av totalt <b>%{count}</b>"

combo_nav_js: "Side %{page_input} av %{pages}"
combo_nav_js: "<label>Side %{page_input}</label> av %{pages}"

items_selector_js: "Vis %{items_input} %{item_name} per side"
items_selector_js: "<label>Vis %{items_input} %{item_name} per side</label>"
4 changes: 2 additions & 2 deletions lib/locales/nl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ nl:
single_page: "Toont <b>%{count}</b> %{item_name}"
multiple_pages: "Toont <b>%{from}-%{to}</b> %{item_name} van <b>%{count}</b> in totaal"

combo_nav_js: "Pagina %{page_input} van %{pages}"
combo_nav_js: "<label>Pagina %{page_input}</label> van %{pages}"

items_selector_js: "Toont %{items_input} %{item_name} per pagina"
items_selector_js: "<label>Toont %{items_input} %{item_name} per pagina</label>"
4 changes: 2 additions & 2 deletions lib/locales/pl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ pl:
single_page: "Wyświetlono <b>%{count}</b> %{item_name}"
multiple_pages: "Wyświetlono %{item_name} <b>%{from}-%{to}</b> z wszystkich <b>%{count}</b>"

combo_nav_js: "Strona %{page_input} z %{pages}"
combo_nav_js: "<label>Strona %{page_input}</label> z %{pages}"

items_selector_js: "Pokaż %{items_input} %{item_name} na stronie"
items_selector_js: "<label>Pokaż %{items_input} %{item_name} na stronie</label>"
4 changes: 2 additions & 2 deletions lib/locales/pt-BR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ pt-BR:
single_page: "Mostrando %{count} %{item_name}"
multiple_pages: "Mostrando %{item_name} %{from}-%{to} do total de %{count}"

combo_nav_js: "Página %{page_input} de %{pages}"
combo_nav_js: "<label>Página %{page_input}</label> de %{pages}"

items_selector_js: "Mostrar %{items_input} %{item_name} por página"
items_selector_js: "<label>Mostrar %{items_input} %{item_name} por página</label>"
4 changes: 2 additions & 2 deletions lib/locales/pt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ pt:
single_page: "Mostrando %{count} %{item_name}"
multiple_pages: "Mostrando %{item_name} %{from}-%{to} de um total de %{count}"

combo_nav_js: "Página %{page_input} de %{pages}"
combo_nav_js: "<label>Página %{page_input}</label> de %{pages}"

items_selector_js: "Mostrar %{items_input} %{item_name} por página"
items_selector_js: "<label>Mostrar %{items_input} %{item_name} por página</label>"
4 changes: 2 additions & 2 deletions lib/locales/ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ ru:
single_page: "<b>%{count}</b> %{item_name}"
multiple_pages: "Всего <b>%{count}</b> %{item_name}, показаны с <b>%{from}</b> по <b>%{to}</b>"

combo_nav_js: "Страница %{page_input} из %{pages}"
combo_nav_js: "<label>Страница %{page_input}</label> из %{pages}"

items_selector_js: "Показать %{items_input} %{item_name} на странице"
items_selector_js: "<label>Показать %{items_input} %{item_name} на странице</label>"
4 changes: 2 additions & 2 deletions lib/locales/sr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ sr:
single_page: "Приказује се <b>%{count}</b> %{item_name}"
multiple_pages: "Приказ %{item_name} <b>%{from}-%{to}</b> од <b>%{count}</b> укупно"

combo_nav_js: "Страниca %{page_input} од %{pages}"
combo_nav_js: "<label>Страниca %{page_input}</label> од %{pages}"

items_selector_js: "Прикажи %{items_input} %{item_name} по страниcи"
items_selector_js: "<label>Прикажи %{items_input} %{item_name} по страниcи</label>"
4 changes: 2 additions & 2 deletions lib/locales/sv-SE.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ sv-SE:
single_page: "Visar <b>%{count}</b> %{item_name}"
multiple_pages: "Visar %{item_name} <b>%{from}-%{to}</b> av <b>%{count}</b> totalt"

combo_nav_js: "Sida %{page_input} av %{pages}"
combo_nav_js: "<label>Sida %{page_input}</label> av %{pages}"

items_selector_js: "Visa %{items_input} %{item_name} per sida"
items_selector_js: "<label>Visa %{items_input} %{item_name} per sida</label>"
4 changes: 2 additions & 2 deletions lib/locales/sv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ sv:
single_page: "Visar <b>%{count}</b> %{item_name}"
multiple_pages: "Visar %{item_name} <b>%{from}-%{to}</b> av <b>%{count}</b> totalt"

combo_nav_js: "Sida %{page_input} av %{pages}"
combo_nav_js: "<label>Sida %{page_input}</label> av %{pages}"

items_selector_js: "Visa %{items_input} %{item_name} per sida"
items_selector_js: "<label>Visa %{items_input} %{item_name} per sida</label>"
4 changes: 2 additions & 2 deletions lib/locales/sw.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ sw:
single_page: "Inaonyesha %{item_name} <b>%{count}</b>"
multiple_pages: "Inaonyesha %{item_name} <b>%{from}-%{to}</b> ya <b>%{count}</b> kwa jumla"

combo_nav_js: "Kurasa %{page_input} ya %{pages}"
combo_nav_js: "<label>Kurasa %{page_input}</label> ya %{pages}"

items_selector_js: "Onyesha %{items_input} %{item_name} kwa kila ukurasa"
items_selector_js: "<label>Onyesha %{items_input} %{item_name} kwa kila ukurasa</label>"
4 changes: 2 additions & 2 deletions lib/locales/tr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ tr:
single_page: "Toplam <b>%{count}</b> %{item_name} gösteriliyor"
multiple_pages: "<b>%{count}</b> %{item_name} içerisinden <b>%{from}-%{to}</b> kadarı gösteriliyor"

combo_nav_js: "Sayfa %{page_input} / %{pages}"
combo_nav_js: "<label>Sayfa %{page_input}</label> / %{pages}"

items_selector_js: "Sayfada %{items_input} %{item_name} göster"
items_selector_js: "<label>Sayfada %{items_input} %{item_name} göster</label>"
4 changes: 2 additions & 2 deletions lib/locales/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ zh-CN:
single_page: "显示<b>%{count}</b> 项%{item_name}"
multiple_pages: "共 <b>%{count}</b> 项%{item_name},显示 <b>%{from}-%{to}</b>"

combo_nav_js: "第 %{page_input} / %{pages} 页"
combo_nav_js: "<label>第 %{page_input}</label> / %{pages} 页"

items_selector_js: "每页显示 %{items_input} 条%"
items_selector_js: "<label>每页显示 %{items_input} 条%</label>"
4 changes: 2 additions & 2 deletions lib/locales/zh-HK.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ zh-HK:
single_page: "顯示 <b>%{count}</b> %{item_name}"
multiple_pages: "共 <b>%{count}</b> %{item_name},顯示 <b>%{from}-%{to}</b>"

combo_nav_js: "第 %{page_input} / %{pages} 頁"
combo_nav_js: "<label>第 %{page_input}</label> / %{pages} 頁"

items_selector_js: "每頁顯示 %{items_input} 記錄"
items_selector_js: "<label>每頁顯示 %{items_input} 記錄</label>"
6 changes: 3 additions & 3 deletions lib/locales/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ zh-TW:
next: "下一頁&nbsp;&rsaquo;"
gap: "&hellip;"

combo_nav_js: "第 %{page_input} / %{pages} 頁"

info:
no_items: "沒找到項"
single_page: "顯示 <b>%{count}</b> 項%{item_name}"
multiple_pages: "共 <b>%{count}</b> 項%{item_name},顯示 <b>%{from}-%{to}</b>"

items_selector_js: "每頁顯示 %{items_input} 項%{item_name}"
combo_nav_js: "<label>第 %{page_input}</label> / %{pages} 頁"

items_selector_js: "<label>每頁顯示 %{items_input} 項%{item_name}"
2 changes: 1 addition & 1 deletion lib/pagy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

# main class
class Pagy
VERSION = '4.5.1'
VERSION = '4.6.0'

# Root pathname to get the path of Pagy files like templates or dictionaries
def self.root
Expand Down
6 changes: 3 additions & 3 deletions lib/pagy/extras/bootstrap.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def pagy_bootstrap_nav(pagy, pagy_id: nil, link_extra: '')
p_id = %( id="#{pagy_id}") if pagy_id
link = pagy_link_proc(pagy, link_extra: %(class="page-link" #{link_extra}))

html = +%(<nav#{p_id} class="pagy-bootstrap-nav" role="navigation" aria-label="pager"><ul class="pagination">)
html = +%(<nav#{p_id} class="pagy-bootstrap-nav" aria-label="pager"><ul class="pagination">)
html << pagy_bootstrap_prev_html(pagy, link)
pagy.series.each do |item| # series example: [1, :gap, 7, 8, "9", 10, 11, :gap, 36]
html << case item
Expand All @@ -35,7 +35,7 @@ def pagy_bootstrap_nav_js(pagy, deprecated_id=nil, pagy_id: nil, link_extra: '',
'gap' => %(<li class="page-item gap disabled"><a href="#" class="page-link">#{pagy_t 'pagy.nav.gap'}</a></li>),
'after' => %(#{pagy_bootstrap_next_html pagy, link}</ul>) }

html = %(<nav#{p_id} class="pagy-njs pagy-bootstrap-nav-js" role="navigation" aria-label="pager"></nav>)
html = %(<nav#{p_id} class="pagy-njs pagy-bootstrap-nav-js" aria-label="pager"></nav>)
html << pagy_json_tag(pagy, :nav, tags, pagy.sequels(steps))
end

Expand All @@ -48,7 +48,7 @@ def pagy_bootstrap_combo_nav_js(pagy, deprecated_id=nil, pagy_id: nil, link_extr
p_pages = pagy.pages
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;">)

%(<nav#{p_id} class="pagy-bootstrap-combo-nav-js pagination" role="navigation" aria-label="pager"><div class="btn-group" role="group">#{
%(<nav#{p_id} class="pagy-bootstrap-combo-nav-js pagination" aria-label="pager"><div class="btn-group" role="group">#{
if (p_prev = pagy.prev)
link.call p_prev, pagy_t('pagy.nav.prev'), 'aria-label="previous" class="prev btn btn-primary"'
else
Expand Down
Loading

0 comments on commit 0c0d013

Please sign in to comment.