Sha256: f8da061af0e0cc7f420622e1041d52380d77f66c70835d6acd8cbd35555d25e0

Contents?: true

Size: 819 Bytes

Versions: 23

Compression:

Stored size: 819 Bytes

Contents

<% # per_page was added in 1.23.1; gems which add to resque-server don't pass that variable along so it would crash %>
<% # without a default value %>
<% per_page ||= 20 %>
<%if  start - per_page >= 0 || start + per_page <= size%>
<p class='pagination'>
  <% if start + per_page <= size %>
    <a href="<%= current_page %>?start=<%= start + per_page %>" class='more'>&laquo; Next</a>
  <% end %>

  <% (size / per_page.to_f - 1).ceil.downto(0).each do |page_num| %>
    <% if start == page_num * per_page %>
       <%= page_num %>
    <% else %>
      <a href="<%= current_page %>?start=<%= page_num * per_page %>"> <%= page_num %></a>
    <% end %>
  <% end %>

  <% if start - per_page >= 0 %>
    <a href="<%= current_page %>?start=<%= start - per_page %>" class='less'>Previous &raquo;</a>
  <% end %>
</p>
<%end%>

Version data entries

23 entries across 23 versions & 8 rubygems

Version Path
resque_sqs-1.25.2 lib/resque_sqs/server/views/next_more.erb
resque-2.0.0 lib/resque/server/views/next_more.erb
resque_admin-1.0.5 lib/resque_admin/server/views/next_more.erb
resque_admin-1.0.4 lib/resque_admin/server/views/next_more.erb
resque_admin-1.0.3 lib/resque/server/views/next_more.erb
resque_admin-1.0.2 lib/resque/server/views/next_more.erb
resque_admin-0.2.0 lib/resque_admin/server/views/next_more.erb
enju_leaf-1.2.1 vendor/bundle/ruby/2.3/gems/resque-1.27.4/lib/resque/server/views/next_more.erb
resque-1.27.4 lib/resque/server/views/next_more.erb
resque-1.27.3 lib/resque/server/views/next_more.erb
resque-1.27.2 lib/resque/server/views/next_more.erb
resque-1.27.1 lib/resque/server/views/next_more.erb
resque-1.27.0 lib/resque/server/views/next_more.erb
resqueue-1.0.0 lib/resque/server/views/next_more.erb
resque-master-0.0.3 lib/resque/server/views/next_more.erb
ish_lib_manager-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/resque-1.26.0/lib/resque/server/views/next_more.erb
resque-1.26.0 lib/resque/server/views/next_more.erb
resque-1.25.2 lib/resque/server/views/next_more.erb
resque-1.26.pre.0 lib/resque/server/views/next_more.erb
resque_signal_from_child-1.25.1 lib/resque/server/views/next_more.erb