1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
mperham--sidekiq/web/views/_paging.erb

24 lines
858 B
Text
Raw Normal View History

2013-08-21 18:38:52 -04:00
<% if @total_size > @count %>
<ul class="pagination pull-right flip">
<li class="<%= 'disabled' if @current_page == 1 %>">
<a href="<%= url %>?page=1">&laquo;</a>
</li>
<% if @current_page > 1 %>
<li>
<a href="<%= url %>?<%= qparams(page: @current_page - 1) %>"><%= @current_page - 1 %></a>
2013-08-21 18:38:52 -04:00
</li>
<% end %>
<li class="disabled">
<a href="<%= url %>?<%= qparams(page: @current_page) %>"><%= @current_page %></a>
</li>
<% if @total_size > @current_page * @count %>
<li>
<a href="<%= url %>?<%= qparams(page: @current_page + 1) %>"><%= @current_page + 1 %></a>
2013-08-21 18:38:52 -04:00
</li>
<% end %>
<li class="<%= 'disabled' if @total_size <= @current_page * @count %>">
<a href="<%= url %>?<%= qparams(page: (@total_size.to_f / @count).ceil) %>">&raquo;</a>
</li>
</ul>
2013-08-21 18:38:52 -04:00
<% end %>