Class: UiBibz::Ui::Ux::Tables::TablePaginationPerPage

Inherits:
Base
  • Object
show all
Includes:
WillPaginate::ActionView
Defined in:
lib/ui_bibz/ui/ux/tables/table_pagination_per_page.rb

Overview

Create a select pagination per page

Attributes

  • options - Options of element

  • html_options - Html Options of element

Options

You can add HTML attributes using the html_options. You can pass arguments in options attribute:

  • store - Store generate by ‘table_search_pagination’ method

Signatures

UiBibz::Ui::Ux::Tables::TablePaginationPerPage.new(store: @store)

Helper

table_pagination_per_page(options = {})

Instance Attribute Summary

Attributes inherited from Base

#output_buffer

Instance Method Summary collapse

Methods inherited from Base

#generate_id, #i18n_set?, #inject_url

Constructor Details

#initialize(options = nil, html_options = nil) ⇒ TablePaginationPerPage

Initialize per_page_field with component item per_page_field require WillPaginate gem



31
32
33
# File 'lib/ui_bibz/ui/ux/tables/table_pagination_per_page.rb', line 31

def initialize(options = nil, html_options = nil)
  @per_page_field = UiBibz::Ui::Core::Component.new nil, options, html_options
end

Instance Method Details

#renderObject

Render html tag



36
37
38
39
40
41
42
43
44
# File 'lib/ui_bibz/ui/ux/tables/table_pagination_per_page.rb', line 36

def render
  if @per_page_field.options[:wrap_form] == false
    per_page_html
  else
    form_tag(url_for(url_parameters), method: :get) do
      per_page_html_in_wrap
    end
  end
end