Sha256: 2ce1e7d5479fe58f7bb9e8786d9da79ce686151d6867c052fd8aa0b5a67a74a3
Contents?: true
Size: 1.32 KB
Versions: 18
Compression:
Stored size: 1.32 KB
Contents
- for_context ||= context - if for_context.pages > 1 .text-center ul.pagination - if for_context.page == 1 li.disabled: a href="#": i.fa.fa-angle-double-left li.disabled: a href="#": i.fa.fa-angle-left - else li: a href="#{url_for(page: 'first')}": i.fa.fa-angle-double-left li: a href="#{url_for(page: 'prev')}": i.fa.fa-angle-left - start = 1 - if for_context.pages > 10 - start = for_context.page - 5 if for_context.page > 5 - if for_context.page > 6 li.disabled: a href="#" ... - start = for_context.pages - 10 if start > for_context.pages - 10 - start.upto(start + 10).each do |page| - break if page > for_context.pages - next if page < 1 - if page == for_context.page li.active: a href="#" = page - else li: a href="#{url_for(page: page)}" = page - if for_context.pages > 10 && \ for_context.page < for_context.pages - 5 li.disabled: a href="#" ... - if for_context.page == for_context.pages li.disabled: a href="#": i.fa.fa-angle-right li.disabled: a href="#": i.fa.fa-angle-double-right - else li: a href="#{url_for(page: 'next')}": i.fa.fa-angle-right li: a href="#{url_for(page: 'last')}": i.fa.fa-angle-double-right
Version data entries
18 entries across 18 versions & 1 rubygems