Sha256: 083d0705b8295fc27e9c6bd6e4c9066d8d1115b0b2cfb040d949ad57b53410b8
Contents?: true
Size: 1.01 KB
Versions: 12
Compression:
Stored size: 1.01 KB
Contents
<%# Link showing page number - available local variables page: a page object for "this" page url: url to this page current_page: a page object for the currently displayed page num_pages: total number of pages per_page: number of items to fetch per page remote: data-remote -%> <% page_display = number_with_delimiter(page.to_s) %> <% link_attrs = { remote: remote, rel: page.next? ? 'next' : page.prev? ? 'prev' : nil, class: 'page-link', } %> <% if page.current? %> <%= tag.li class: class_names('page-item', 'active'), aria_current: 'page' do %> <%= link_to page_display, url, link_attrs.merge(aria: { label: t('views.pagination.aria.current_page', page: page_display) }) %> <% end %> <% else %> <%= tag.li class: 'page-item' do %> <%= link_to page_display, url, link_attrs.merge(aria: { label: t('views.pagination.aria.go_to_page', page: page_display) }) %> <% end %> <% end %>
Version data entries
12 entries across 12 versions & 1 rubygems