Sha256: e8f494db07b262ded83af4fe7c0c79bb05de909aa3a957ff3ccbebd5903d64d7

Contents?: true

Size: 997 Bytes

Versions: 35

Compression:

Stored size: 997 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
.table_pagination.pagination.ui.buttons
  %a.ui.compact.arrow.button.prev(href="#") «

  %a.ui.compact.arrow.button.next(href="#") »

  .ui.compact.all.left.labeled.button.labeled_all
    - if page == 'all'
      %a.ui.basic.label(href="#")= total_size 
    - else
      %a.ui.basic.right.pointing.label(href="#")= total_size 
      %a.ui.compact.button.all(href="#") all 

  - if num - 2 > 1
    %a.ui.compact.num.button(href="#") 1

  - if num - 2 > 2
    .ui.compact.disabled.button
      \...

  - (start..eend).each do |p|
    %a.ui.compact.num.button(class="#{p.to_s == num.to_s ? "active" : "" }" href="#")= p

  - if num + 3 < total_nums
    .ui.compact.disabled.button
      \...

  - if num + 2 < total_nums
    %a.ui.compact.num.button(href="#")= total_nums



Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
rbbt-rest-1.8.136 share/views/partials/table/page.haml
rbbt-rest-1.8.135 share/views/partials/table/page.haml
rbbt-rest-1.8.134 share/views/partials/table/page.haml
rbbt-rest-1.8.133 share/views/partials/table/page.haml
rbbt-rest-1.8.132 share/views/partials/table/page.haml
rbbt-rest-1.8.131 share/views/partials/table/page.haml
rbbt-rest-1.8.130 share/views/partials/table/page.haml
rbbt-rest-1.8.129 share/views/partials/table/page.haml
rbbt-rest-1.8.126 share/views/partials/table/page.haml
rbbt-rest-1.8.123 share/views/partials/table/page.haml
rbbt-rest-1.8.122 share/views/partials/table/page.haml
rbbt-rest-1.8.121 share/views/partials/table/page.haml
rbbt-rest-1.8.120 share/views/partials/table/page.haml
rbbt-rest-1.8.119 share/views/partials/table/page.haml
rbbt-rest-1.8.118 share/views/partials/table/page.haml