Sha256: d602fbe9a61b3cecc486b22ca1d334a9e26198483214a246d8d6a008a4dd1ac8
Contents?: true
Size: 784 Bytes
Versions: 35
Compression:
Stored size: 784 Bytes
Contents
- num, size, field = parse_page(page) - num = num.to_i - total_nums = total_size.to_i / size.to_i - total_nums += 1 if total_size.to_i % size.to_i > 0 - start = [1, num - 2].max - eend = [total_nums, num + 2].min %ul.table_pagination.pagination %li(class="arrow") %a.prev(href="#") « %li(class="arrow") %a.next(href="#") » %li(class="all") %a.all(href="#") all - if num - 2 > 1 %li(class="num") %a(href="#") 1 - if num - 2 > 2 %li(class="inactive") \... - (start..eend).each do |p| %li(class="num#{p.to_s == num.to_s ? " active" : "" }") %a(href="#")= p - if num + 3 < total_nums %li(class="inactive") \... - if num + 2 < total_nums %li(class="num") %a(href="#")= total_nums
Version data entries
35 entries across 35 versions & 1 rubygems