Sha256: 07deec573fc77e0e0675a2426c669474d8ac78374ebe0ac3fa2574e2b4efaee7

Contents?: true

Size: 1.42 KB

Versions: 17

Compression:

Stored size: 1.42 KB

Contents

module UiBibz::Helpers::UiUxHelper

  def grid options = nil, html_options = nil, &block
    UiBibz::Ui::Ux::Grid.new(options, html_options).tap(&block).render
  end

  # Table section begin ------------------------------------------------------
  def table content = nil, options = nil, html_options = nil, &block
    if is_tap(content, options)
      UiBibz::Ui::Ux::Table.new(content, options, html_options).tap(&block).render
    else
      UiBibz::Ui::Ux::Table.new(content, options, html_options, &block).render
    end
  end

  def table_search_field options, html_options = nil
    UiBibz::Ui::Ux::TableSearchField.new(options, html_options).render
  end

  def table_pagination_per_page options, html_options = nil
    UiBibz::Ui::Ux::TablePaginationPerPage.new(options, html_options).render
  end

  def table_pagination options, html_options = nil
    UiBibz::Ui::Ux::TablePagination.new(options, html_options).render
  end

  def table_panel content = nil, options = nil, html_options = nil, &block
    if is_tap(content, options)
      UiBibz::Ui::Ux::TablePanel.new(content, options, html_options).tap(&block).render
    else
      UiBibz::Ui::Ux::TablePanel.new(content, options, html_options, &block).render
    end
  end
  # Table section end -------------------------------------------------------

private

  def is_tap content, options
    (content[:tap] if content.kind_of?(Hash)) || (options[:tap] unless options.nil?)
  end

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
ui_bibz-1.2.5.3 lib/ui_bibz/helpers/ui_ux_helper.rb
ui_bibz-1.2.5.2 lib/ui_bibz/helpers/ui_ux_helper.rb
ui_bibz-1.2.5.1 lib/ui_bibz/helpers/ui_ux_helper.rb
ui_bibz-1.2.5 lib/ui_bibz/helpers/ui_ux_helper.rb
ui_bibz-1.2.4 lib/ui_bibz/helpers/ui_ux_helper.rb
ui_bibz-1.2.3 lib/ui_bibz/helpers/ui_ux_helper.rb
ui_bibz-1.2.2 lib/ui_bibz/helpers/ui_ux_helper.rb
ui_bibz-1.2.1 lib/ui_bibz/helpers/ui_ux_helper.rb
ui_bibz-1.2.0 lib/ui_bibz/helpers/ui_ux_helper.rb
ui_bibz-1.1.7 lib/ui_bibz/helpers/ui_ux_helper.rb
ui_bibz-1.1.6 lib/ui_bibz/helpers/ui_ux_helper.rb
ui_bibz-1.1.5 lib/ui_bibz/helpers/ui_ux_helper.rb
ui_bibz-1.1.4 lib/ui_bibz/helpers/ui_ux_helper.rb
ui_bibz-1.1.3 lib/ui_bibz/helpers/ui_ux_helper.rb
ui_bibz-1.1.2 lib/ui_bibz/helpers/ui_ux_helper.rb
ui_bibz-1.1.1 lib/ui_bibz/helpers/ui_ux_helper.rb
ui_bibz-1.1.0 lib/ui_bibz/helpers/ui_ux_helper.rb