Class: UiBibz::Ui::Ux::Tables::Column
- Inherits:
-
Core::Component
- Object
- Base
- Core::Component
- UiBibz::Ui::Ux::Tables::Column
- Defined in:
- lib/ui_bibz/ui/ux/tables/components/column.rb
Constant Summary
Constants inherited from Core::Component
Core::Component::BREAKPOINTS, Core::Component::SIZES, Core::Component::STATUSES
Instance Attribute Summary collapse
-
#as ⇒ Object
Returns the value of attribute as.
-
#class ⇒ Object
Returns the value of attribute class.
-
#count ⇒ Object
Returns the value of attribute count.
-
#custom_sort ⇒ Object
Returns the value of attribute custom_sort.
-
#data_index ⇒ Object
Returns the value of attribute data_index.
-
#date_format ⇒ Object
Returns the value of attribute date_format.
-
#format ⇒ Object
Returns the value of attribute format.
-
#hidden ⇒ Object
Returns the value of attribute hidden.
-
#id ⇒ Object
Returns the value of attribute id.
-
#input_options ⇒ Object
Returns the value of attribute input_options.
-
#link ⇒ Object
Returns the value of attribute link.
-
#name ⇒ Object
Returns the value of attribute name.
-
#parent ⇒ Object
Returns the value of attribute parent.
-
#progress_options ⇒ Object
Returns the value of attribute progress_options.
-
#sort ⇒ Object
Returns the value of attribute sort.
-
#sortable ⇒ Object
Returns the value of attribute sortable.
Attributes inherited from Core::Component
#content, #html_options, #options
Attributes inherited from Base
Instance Method Summary collapse
- #hidden? ⇒ Boolean
-
#initialize(content = nil, options = nil, html_options = nil, &block) ⇒ Column
constructor
A new instance of Column.
- #linkable? ⇒ Boolean
- #order ⇒ Object
Methods inherited from Core::Component
#pre_render, #render, #tapped?
Methods included from PopoverExtension
#popover_data_html, #tooltip_data_html
Methods included from GlyphExtension
#generate_glyph, #glyph_and_content_html
Methods included from KlassExtension
#exclude_classes, #exclude_classes_in_html_options, #join_classes, #status
Methods inherited from Base
#generate_id, #i18n_set?, #inject_url
Constructor Details
#initialize(content = nil, options = nil, html_options = nil, &block) ⇒ Column
Returns a new instance of Column.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
# File 'lib/ui_bibz/ui/ux/tables/components/column.rb', line 9 def initialize(content = nil, = nil, = 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] @sortable = @options[:sortable] @input_options = @options[:input_options] @progress_options = @options[:progress_options] || {} end |
Instance Attribute Details
#as ⇒ Object
Returns the value of attribute as.
5 6 7 |
# File 'lib/ui_bibz/ui/ux/tables/components/column.rb', line 5 def as @as end |
#class ⇒ Object
Returns the value of attribute class.
5 6 7 |
# File 'lib/ui_bibz/ui/ux/tables/components/column.rb', line 5 def class @class end |
#count ⇒ Object
Returns the value of attribute count.
5 6 7 |
# File 'lib/ui_bibz/ui/ux/tables/components/column.rb', line 5 def count @count end |
#custom_sort ⇒ Object
Returns the value of attribute custom_sort.
5 6 7 |
# File 'lib/ui_bibz/ui/ux/tables/components/column.rb', line 5 def custom_sort @custom_sort end |
#data_index ⇒ Object
Returns the value of attribute data_index.
5 6 7 |
# File 'lib/ui_bibz/ui/ux/tables/components/column.rb', line 5 def data_index @data_index end |
#date_format ⇒ Object
Returns the value of attribute date_format.
5 6 7 |
# File 'lib/ui_bibz/ui/ux/tables/components/column.rb', line 5 def date_format @date_format end |
#format ⇒ Object
Returns the value of attribute format.
5 6 7 |
# File 'lib/ui_bibz/ui/ux/tables/components/column.rb', line 5 def format @format end |
#hidden ⇒ Object
Returns the value of attribute hidden.
5 6 7 |
# File 'lib/ui_bibz/ui/ux/tables/components/column.rb', line 5 def hidden @hidden end |
#id ⇒ Object
Returns the value of attribute id.
5 6 7 |
# File 'lib/ui_bibz/ui/ux/tables/components/column.rb', line 5 def id @id end |
#input_options ⇒ Object
Returns the value of attribute input_options.
5 6 7 |
# File 'lib/ui_bibz/ui/ux/tables/components/column.rb', line 5 def @input_options end |
#link ⇒ Object
Returns the value of attribute link.
5 6 7 |
# File 'lib/ui_bibz/ui/ux/tables/components/column.rb', line 5 def link @link end |
#name ⇒ Object
Returns the value of attribute name.
5 6 7 |
# File 'lib/ui_bibz/ui/ux/tables/components/column.rb', line 5 def name @name end |
#parent ⇒ Object
Returns the value of attribute parent.
5 6 7 |
# File 'lib/ui_bibz/ui/ux/tables/components/column.rb', line 5 def parent @parent end |
#progress_options ⇒ Object
Returns the value of attribute progress_options.
5 6 7 |
# File 'lib/ui_bibz/ui/ux/tables/components/column.rb', line 5 def @progress_options end |
#sort ⇒ Object
Returns the value of attribute sort.
5 6 7 |
# File 'lib/ui_bibz/ui/ux/tables/components/column.rb', line 5 def sort @sort end |
#sortable ⇒ Object
Returns the value of attribute sortable.
5 6 7 |
# File 'lib/ui_bibz/ui/ux/tables/components/column.rb', line 5 def sortable @sortable end |
Instance Method Details
#hidden? ⇒ Boolean
38 39 40 |
# File 'lib/ui_bibz/ui/ux/tables/components/column.rb', line 38 def hidden? @hidden == true end |
#linkable? ⇒ Boolean
30 31 32 |
# File 'lib/ui_bibz/ui/ux/tables/components/column.rb', line 30 def linkable? !@link.nil? end |
#order ⇒ Object
34 35 36 |
# File 'lib/ui_bibz/ui/ux/tables/components/column.rb', line 34 def order @order || 0 end |