Sha256: 0779d5511a5a5d63f4a3e6d30b439dc46f96b2d80c2df5f347da0aca63cd05e2

Contents?: true

Size: 1.16 KB

Versions: 46

Compression:

Stored size: 1.16 KB

Contents

module UiBibz::Ui::Ux::Tables
  class Column < UiBibz::Ui::Core::Component

    attr_accessor :hidden, :link, :status, :name, :input_options, :class, :as, :data_index, :date_format, :sort, :format, :date_format, :count, :custom_sort, :parent, :id

    def initialize content = nil, options = nil, html_options = nil, &block
      super
      @data_index    = @content
      @id            = @options[:column_id] || @data_index
      @name          = @options[:name]
      @link          = @options[:link] # for show or edit action
      @order         = @options[:order]
      @date_format   = @options[:date_format]
      @sort          = @options[:sort]
      @custom_sort   = @options[:custom_sort]
      @parent        = @options[:parent]
      @count         = @options[:count]
      @as            = @options[:as]
      @format        = @options[:format]
      @class         = @options[:class]
      @hidden        = @options[:hidden]
      @input_options = @options[:input_options]
      @status         = @options[:status]
    end

    def linkable?
      !@link.nil?
    end

    def order
      @order || 0
    end

    def hidden?
      @hidden == true
    end

  end
end

Version data entries

46 entries across 46 versions & 1 rubygems

Version Path
ui_bibz-2.3.2 lib/ui_bibz/ui/ux/tables/components/column.rb
ui_bibz-2.3.1 lib/ui_bibz/ui/ux/tables/components/column.rb
ui_bibz-2.3.0 lib/ui_bibz/ui/ux/tables/components/column.rb
ui_bibz-2.2.2 lib/ui_bibz/ui/ux/tables/components/column.rb
ui_bibz-2.2.1 lib/ui_bibz/ui/ux/tables/components/column.rb
ui_bibz-2.2.0 lib/ui_bibz/ui/ux/tables/components/column.rb
ui_bibz-2.1.6 lib/ui_bibz/ui/ux/tables/components/column.rb
ui_bibz-2.1.5 lib/ui_bibz/ui/ux/tables/components/column.rb
ui_bibz-2.1.4 lib/ui_bibz/ui/ux/tables/components/column.rb
ui_bibz-2.1.3 lib/ui_bibz/ui/ux/tables/components/column.rb
ui_bibz-2.1.2 lib/ui_bibz/ui/ux/tables/components/column.rb
ui_bibz-2.1.1 lib/ui_bibz/ui/ux/tables/components/column.rb
ui_bibz-2.0.10 lib/ui_bibz/ui/ux/tables/components/column.rb
ui_bibz-2.0.9 lib/ui_bibz/ui/ux/tables/components/column.rb
ui_bibz-2.1.0 lib/ui_bibz/ui/ux/tables/components/column.rb
ui_bibz-2.0.8 lib/ui_bibz/ui/ux/tables/components/column.rb
ui_bibz-2.0.7 lib/ui_bibz/ui/ux/tables/components/column.rb
ui_bibz-2.0.5 lib/ui_bibz/ui/ux/tables/components/column.rb
ui_bibz-2.0.4 lib/ui_bibz/ui/ux/tables/components/column.rb
ui_bibz-2.0.3 lib/ui_bibz/ui/ux/tables/components/column.rb