Sha256: 9dfa3362c57b87e0fc3050e7de19c68ecc7846aeae7524df49cab3c677d04bad

Contents?: true

Size: 860 Bytes

Versions: 5

Compression:

Stored size: 860 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

5 entries across 5 versions & 1 rubygems

Version Path
resque-scheduler-web-1.0.0 app/views/resque_web/plugins/resque_scheduler/delayed/_next_more.erb
resque-scheduler-web-0.0.4 app/views/resque_web/plugins/resque_scheduler/delayed/_next_more.erb
resque-scheduler-web-0.0.3 app/views/resque_web/plugins/resque_scheduler/delayed/_next_more.erb
resque-scheduler-web-0.0.2 app/views/resque_web/plugins/resque_scheduler/delayed/_next_more.erb
resque-scheduler-web-0.0.1 app/views/resque_web/plugins/resque_scheduler/delayed/_next_more.erb