Sha256: 341397cd7a51faf08d4b51fb6890df3ac44d9fbbacf597e507f34751310004b3

Contents?: true

Size: 1.73 KB

Versions: 27

Compression:

Stored size: 1.73 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 ("&lsaquo; Prev", "Next &rsaquo;", "&hellip;").

  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, link_extra: 'class="page-link"') -%>
<%#                            -%><nav aria-label="pager"  class="pagy-bootstrap-nav" role="navigation">
<%#                            -%>  <ul class="pagination">
<% if pagy.prev                -%>    <li class="page-item prev"><%== link.call(pagy.prev, pagy_t('pagy.nav.prev'), 'aria-label="previous"') %></li>
<% else                        -%>    <li class="page-item prev disabled"><a href="#" class="page-link"><%== pagy_t('pagy.nav.prev') %></a></li>
<% end                         -%>
<% pagy.series.each do |item| # series example: [1, :gap, 7, 8, "9", 10, 11, :gap, 36] -%>
<%   if    item.is_a?(Integer) -%>    <li class="page-item"><%== link.call(item) %></li>
<%   elsif item.is_a?(String)  -%>    <li class="page-item active"><%== link.call(item) %></li>
<%   elsif item == :gap        -%>    <li class="page-item disabled gap"><a href="#" class="page-link"><%== pagy_t('pagy.nav.gap') %></a></li>
<%   end                       -%>
<% end                         -%>
<% if pagy.next                -%>    <li class="page-item next"><%== link.call(pagy.next, pagy_t('pagy.nav.next'), 'aria-label="next"') %></li>
<% else                        -%>    <li class="page-item next disabled"><a href="#" class="page-link"><%== pagy_t('pagy.nav.next') %></a></li>
<% end                         -%>
<%#                            -%>  </ul>
<%#                            -%></nav>

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
pagy-5.10.1 lib/templates/bootstrap_nav.html.erb
pagy-5.10.0 lib/templates/bootstrap_nav.html.erb
pagy-5.9.3 lib/templates/bootstrap_nav.html.erb
pagy-5.9.2 lib/templates/bootstrap_nav.html.erb
pagy-5.9.1 lib/templates/bootstrap_nav.html.erb
pagy-5.9.0 lib/templates/bootstrap_nav.html.erb
pagy-5.8.1 lib/templates/bootstrap_nav.html.erb
pagy-5.8.0 lib/templates/bootstrap_nav.html.erb
pagy-5.7.6 lib/templates/bootstrap_nav.html.erb
pagy-5.7.5 lib/templates/bootstrap_nav.html.erb
pagy-5.7.4 lib/templates/bootstrap_nav.html.erb
pagy-5.7.3 lib/templates/bootstrap_nav.html.erb
pagy-5.7.2 lib/templates/bootstrap_nav.html.erb
pagy-5.7.1 lib/templates/bootstrap_nav.html.erb
pagy-5.7.0 lib/templates/bootstrap_nav.html.erb
pagy-5.6.10 lib/templates/bootstrap_nav.html.erb
pagy-5.6.9 lib/templates/bootstrap_nav.html.erb
pagy-5.6.8 lib/templates/bootstrap_nav.html.erb
pagy-5.6.7 lib/templates/bootstrap_nav.html.erb
pagy-5.6.6 lib/templates/bootstrap_nav.html.erb