Sha256: f025d5d94d78e63c49ebf1794b1f3bf9bf790fc814a7d3a52112480315c3150e

Contents?: true

Size: 1.3 KB

Versions: 47

Compression:

Stored size: 1.3 KB

Contents

/ This template is i18n-ready: if you don't use i18n, then you can replace the pagy_t
/ calls with the actual strings ("‹ Prev", "Next ›", "…").

/ The link variable is set to a proc that returns the link tag.
/ Usage: link.call( page_number [, text [, extra_attributes_string ]])

- link = pagy_link_proc(pagy, 'class="page-link"')

nav.pagy-bootstrap-nav role="navigation" aria-label="pager"

  ul.pagination

    - if pagy.prev
      li.page-item.prev == link.call(pagy.prev, pagy_t('pagy.nav.prev'), 'aria-label="previous"')
    - else
      li.page-item.prev.disabled
        a.page-link href="#" == pagy_t('pagy.nav.prev')

    - pagy.series.each do |item|                 # series example: [1, :gap, 7, 8, "9", 10, 11, :gap, 36]
      - if item.is_a?(Integer)                   # page link
        li.page-item == link.call(item)

      - elsif item.is_a?(String)                 # current page
        li.page-item.active == link.call(item)

      - elsif item == :gap                       # page gap
        li.page-item.disabled.gap
          a.page-link href="#" == pagy_t('pagy.nav.gap')

    - if pagy.next
      li.page-item.next == link.call(pagy.next, pagy_t('pagy.nav.next'), 'aria-label="next"')
    - else
      li.page-item.next.disabled
        a.page-link href="#" == pagy_t('pagy.nav.next')

Version data entries

47 entries across 47 versions & 2 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/pagy-4.11.0/lib/templates/bootstrap_nav.html.slim
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/pagy-4.11.0/lib/templates/bootstrap_nav.html.slim
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/pagy-4.11.0/lib/templates/bootstrap_nav.html.slim
pagy-5.5.0 lib/templates/bootstrap_nav.html.slim
pagy-5.4.0 lib/templates/bootstrap_nav.html.slim
pagy-5.3.1 lib/templates/bootstrap_nav.html.slim
pagy-5.3.0 lib/templates/bootstrap_nav.html.slim
pagy-5.2.3 lib/templates/bootstrap_nav.html.slim
pagy-5.2.2 lib/templates/bootstrap_nav.html.slim
pagy-5.2.1 lib/templates/bootstrap_nav.html.slim
pagy-5.2.0 lib/templates/bootstrap_nav.html.slim
pagy-5.1.3 lib/templates/bootstrap_nav.html.slim
pagy-5.1.2 lib/templates/bootstrap_nav.html.slim
pagy-5.1.1 lib/templates/bootstrap_nav.html.slim
pagy-5.1.0 lib/templates/bootstrap_nav.html.slim
pagy-5.0.1 lib/templates/bootstrap_nav.html.slim
pagy-5.0.0 lib/templates/bootstrap_nav.html.slim
pagy-4.11.0 lib/templates/bootstrap_nav.html.slim
pagy-4.10.2 lib/templates/bootstrap_nav.html.slim
pagy-4.10.1 lib/templates/bootstrap_nav.html.slim