Sha256: bae9534615578396001204bcfe3efc8d6ce56228a07847d8e2d94ce416d04d68
Contents?: true
Size: 1.18 KB
Versions: 24
Compression:
Stored size: 1.18 KB
Contents
<% pagination_size_hash = { 'large' => 'lg', 'small' => 'sm' } %> <% per_page = 20 unless defined?(per_page) and per_page %> <% object_count = 0 unless defined?(object_count) and object_count %> <% page = params[:page].blank? ? 1 : params[:page].to_i %> <% current_page_min = (page - 1)*per_page + 1 %> <% current_page_max = page*per_page %> <ul class="pagination pull-right <%= "pagination-#{pagination_size_hash[pagination_size]}" if defined?(pagination_size) and ['large', 'small'].include?(pagination_size) %>"> <% if current_page_min > 1 %> <li><%= link_to '«'.html_safe, url_for( params.merge( page: page - 1 ) ) %></li> <% else %> <li class="disabled"><span>«</span></li> <% end %> <li> <span style="color:#333"> <b><%= number_with_delimiter current_page_min %> to <%= number_with_delimiter [current_page_max, object_count].min %></b> of <%= number_with_delimiter object_count %> </span> </li> <% if current_page_max < object_count %> <li><%= link_to '»'.html_safe, url_for( params.merge( page: page + 1 ) ) %></li> <% else %> <li class="disabled"><span>»</span></li> <% end %> </ul> <div class="clear"> </div>
Version data entries
24 entries across 24 versions & 1 rubygems