Sha256: 3fb7a81e219966d97f65cfdb502f6669d95e7e76ac317a5f2ba37643174fda13
Contents?: true
Size: 1.52 KB
Versions: 1
Compression:
Stored size: 1.52 KB
Contents
module Kaminari module Bootstrap3000 # = Helpers module ActionViewExtension # A helper that renders the pagination links. # # <%= paginate @articles %> # # ==== Options # * <tt>:window</tt> - The "inner window" size (4 by default). # * <tt>:outer_window</tt> - The "outer window" size (0 by default). # * <tt>:left</tt> - The "left outer window" size (0 by default). # * <tt>:right</tt> - The "right outer window" size (0 by default). # * <tt>:params</tt> - url_for parameters for the links (:controller, :action, etc.) # * <tt>:param_name</tt> - parameter name for page number in the links (:page by default) # * <tt>:remote</tt> - Ajax? (false by default) # * <tt>:ANY_OTHER_VALUES</tt> - Any other hash key & values would be directly passed into each tag as :locals value. def paginate3000stats(scope, options = {}, &block) raw %Q(<div class="paginator_totals panel panel-default"> <div class="panel-body text-right"> <div class="items">#{scope.total_count} #{Russian.p(scope.total_count,"запись","записи","записей")}</div> <div class="pages">#{scope.total_pages} #{Russian.p(scope.total_pages,"страница","страницы","страниц")}</div> </div> </div>) end def clearfix() raw %Q(<div class="clearfix"></div>) end def paginate3000(scope, options = {}, &block) paginate3000stats(scope)+ paginate(scope,options.reverse_merge(:theme => '3000'),&block)+ clearfix() end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
kaminari-bootstrap-3000-0.3 | lib/kaminari/bootstrap3000/helpers/action_view_extension.rb |