2013-08-21 18:38:52 -04:00
|
|
|
<% if @total_size > @count %>
|
2017-03-16 16:51:29 -04:00
|
|
|
<ul class="pagination pull-right flip">
|
2013-10-03 23:13:33 -04:00
|
|
|
<li class="<%= 'disabled' if @current_page == 1 %>">
|
2013-10-25 21:52:59 -04:00
|
|
|
<a href="<%= url %>?page=1">«</a>
|
2013-10-03 23:13:33 -04:00
|
|
|
</li>
|
|
|
|
<% if @current_page > 1 %>
|
|
|
|
<li>
|
2013-10-25 21:52:59 -04:00
|
|
|
<a href="<%= url %>?<%= qparams(page: @current_page - 1) %>"><%= @current_page - 1 %></a>
|
2013-08-21 18:38:52 -04:00
|
|
|
</li>
|
2013-10-03 23:13:33 -04:00
|
|
|
<% end %>
|
|
|
|
<li class="disabled">
|
2013-10-25 21:52:59 -04:00
|
|
|
<a href="<%= url %>?<%= qparams(page: @current_page) %>"><%= @current_page %></a>
|
2013-10-03 23:13:33 -04:00
|
|
|
</li>
|
|
|
|
<% if @total_size > @current_page * @count %>
|
|
|
|
<li>
|
2013-10-25 21:52:59 -04:00
|
|
|
<a href="<%= url %>?<%= qparams(page: @current_page + 1) %>"><%= @current_page + 1 %></a>
|
2013-08-21 18:38:52 -04:00
|
|
|
</li>
|
2013-10-03 23:13:33 -04:00
|
|
|
<% end %>
|
|
|
|
<li class="<%= 'disabled' if @total_size <= @current_page * @count %>">
|
2013-10-25 21:52:59 -04:00
|
|
|
<a href="<%= url %>?<%= qparams(page: (@total_size.to_f / @count).ceil) %>">»</a>
|
2013-10-03 23:13:33 -04:00
|
|
|
</li>
|
|
|
|
</ul>
|
2013-08-21 18:38:52 -04:00
|
|
|
<% end %>
|