Sha256: 01d638a411c6eb9f0097fc6808f79df49a728bdfb0099adbc7e8eb59d1c6d04b

Contents?: true

Size: 1.08 KB

Versions: 143

Compression:

Stored size: 1.08 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)

nav.pagy_nav.pagination role="navigation" aria-label="pager"

  - if pagy.prev
    span.page.prev ==> link.call(pagy.prev, pagy_t('pagy.nav.prev'), 'aria-label="previous"')
  - else
    span.page.prev.disabled ==> 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
      span.page ==> link.call(item)

    - elsif item.is_a?(String)        # current page
      span.page.current ==> item

    - elsif item == :gap              # page gap
      span.page.gap ==> pagy_t('pagy.nav.gap')

  - if pagy.next
    span.page.next == link.call(pagy.next, pagy_t('pagy.nav.next'), 'aria-label="next"')
  - else
    span.page.next.disabled == pagy_t('pagy.nav.next')

Version data entries

143 entries across 143 versions & 2 rubygems

Version Path
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/pagy-4.11.0/lib/templates/nav.html.slim
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/pagy-4.11.0/lib/templates/nav.html.slim
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/pagy-4.11.0/lib/templates/nav.html.slim
pagy-5.10.1 lib/templates/nav.html.slim
pagy-5.10.0 lib/templates/nav.html.slim
pagy-5.9.3 lib/templates/nav.html.slim
pagy-5.9.2 lib/templates/nav.html.slim
pagy-5.9.1 lib/templates/nav.html.slim
pagy-5.9.0 lib/templates/nav.html.slim
pagy-5.8.1 lib/templates/nav.html.slim
pagy-5.8.0 lib/templates/nav.html.slim
pagy-5.7.6 lib/templates/nav.html.slim
pagy-5.7.5 lib/templates/nav.html.slim
pagy-5.7.4 lib/templates/nav.html.slim
pagy-5.7.3 lib/templates/nav.html.slim
pagy-5.7.2 lib/templates/nav.html.slim
pagy-5.7.1 lib/templates/nav.html.slim
pagy-5.7.0 lib/templates/nav.html.slim
pagy-5.6.10 lib/templates/nav.html.slim
pagy-5.6.9 lib/templates/nav.html.slim