module Kaminari::Bootstrap3000::ActionViewExtension
Helpers¶ ↑
Public Instance Methods
clearfix()
click to toggle source
# File lib/kaminari/bootstrap3000/helpers/action_view_extension.rb, line 30 def clearfix() raw %Q(<div class="clearfix"></div>) end
paginate3000(scope, options = {}, &block)
click to toggle source
# File lib/kaminari/bootstrap3000/helpers/action_view_extension.rb, line 34 def paginate3000(scope, options = {}, &block) paginate3000stats(scope)+ paginate(scope,options.reverse_merge(:theme => '3000'),&block)+ clearfix() end
paginate3000stats(scope, options = {}, &block)
click to toggle source
A helper that renders the pagination links.
<%= paginate @articles %>
Options¶ ↑
-
:window
- The “inner window” size (4 by default). -
:outer_window
- The “outer window” size (0 by default). -
:left
- The “left outer window” size (0 by default). -
:right
- The “right outer window” size (0 by default). -
:params
- url_for parameters for the links (:controller, :action, etc.) -
:param_name
- parameter name for page number in the links (:page by default) -
:remote
- Ajax? (false by default) -
:ANY_OTHER_VALUES
- Any other hash key & values would be directly passed into each tag as :locals value.
# File lib/kaminari/bootstrap3000/helpers/action_view_extension.rb, line 21 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