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.9.1 share/views/partials/table/page.haml
rbbt-rest-1.9.0 share/views/partials/table/page.haml
rbbt-rest-1.8.157 share/views/partials/table/page.haml
rbbt-rest-1.8.156 share/views/partials/table/page.haml
rbbt-rest-1.8.155 share/views/partials/table/page.haml
rbbt-rest-1.8.154 share/views/partials/table/page.haml
rbbt-rest-1.8.152 share/views/partials/table/page.haml
rbbt-rest-1.8.151 share/views/partials/table/page.haml
rbbt-rest-1.8.150 share/views/partials/table/page.haml
rbbt-rest-1.8.148 share/views/partials/table/page.haml
rbbt-rest-1.8.147 share/views/partials/table/page.haml
rbbt-rest-1.8.146 share/views/partials/table/page.haml
rbbt-rest-1.8.145 share/views/partials/table/page.haml
rbbt-rest-1.8.144 share/views/partials/table/page.haml
rbbt-rest-1.8.143 share/views/partials/table/page.haml
rbbt-rest-1.8.142 share/views/partials/table/page.haml
rbbt-rest-1.8.140 share/views/partials/table/page.haml
rbbt-rest-1.8.139 share/views/partials/table/page.haml
rbbt-rest-1.8.138 share/views/partials/table/page.haml
rbbt-rest-1.8.137 share/views/partials/table/page.haml