Class: UiBibz::Ui::Ux::Containers::Panel
- Inherits:
-
Core::Component
- Object
- Base
- Core::Component
- UiBibz::Ui::Ux::Containers::Panel
- Includes:
- Concerns::HtmlConcern
- Defined in:
- lib/ui_bibz/ui/ux/containers/panel.rb
Overview
Create a Panel
This element is an extend of UiBibz::Ui::Core::Boxes::Card
Attributes
-
content- Content of element -
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::Containers::Panel.new do |p|
p.header 'header'
p. do |t|
t.btn_group do |bg|
bg. 'button'
end
end
p.body 'body'
p. 'footer'
end
Constant Summary
Constants inherited from Core::Component
Core::Component::BREAKPOINTS, Core::Component::SIZES, Core::Component::STATUSES
Instance Attribute Summary
Attributes inherited from Core::Component
#content, #html_options, #options
Attributes inherited from Base
Instance Method Summary collapse
- #body(content = nil, options = nil, html_options = nil, &block) ⇒ Object
- #column(content = nil, options = nil, html_options = nil, &block) ⇒ Object
- #deck(content = nil, options = nil, html_options = nil, &block) ⇒ Object
-
#footer(content = nil, options = nil, html_options = nil, &block) ⇒ Object
Add Header which is a component.
- #group(content = nil, options = nil, html_options = nil, &block) ⇒ Object
-
#header(content = nil, options = nil, html_options = nil, &block) ⇒ Object
Add Header which is a component.
-
#initialize(content = nil, options = nil, html_options = nil, &block) ⇒ Panel
constructor
A new instance of Panel.
- #panel(content = nil, options = nil, html_options = nil, &block) ⇒ Object
- #pre_render ⇒ Object
- #toolbar(content = nil, options = nil, html_options = nil, &block) ⇒ Object
Methods inherited from Core::Component
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) ⇒ Panel
Returns a new instance of Panel.
44 45 46 47 |
# File 'lib/ui_bibz/ui/ux/containers/panel.rb', line 44 def initialize(content = nil, = nil, = nil, &block) super @items = [] end |
Instance Method Details
#body(content = nil, options = nil, html_options = nil, &block) ⇒ Object
73 74 75 |
# File 'lib/ui_bibz/ui/ux/containers/panel.rb', line 73 def body(content = nil, = nil, = nil, &block) @items << UiBibz::Ui::Ux::Containers::Components::PanelBody.new(content, , , &block).render end |
#column(content = nil, options = nil, html_options = nil, &block) ⇒ Object
61 62 63 |
# File 'lib/ui_bibz/ui/ux/containers/panel.rb', line 61 def column(content = nil, = nil, = nil, &block) @items << UiBibz::Ui::Ux::Containers::Components::PanelColumn.new(content, , ).tap(&block).render end |
#deck(content = nil, options = nil, html_options = nil, &block) ⇒ Object
57 58 59 |
# File 'lib/ui_bibz/ui/ux/containers/panel.rb', line 57 def deck(content = nil, = nil, = nil, &block) @items << UiBibz::Ui::Ux::Containers::Components::PanelDeck.new(content, , ).tap(&block).render end |
#footer(content = nil, options = nil, html_options = nil, &block) ⇒ Object
Add Header which is a component
87 88 89 90 91 92 93 |
# File 'lib/ui_bibz/ui/ux/containers/panel.rb', line 87 def (content = nil, = nil, = nil, &block) = if tapped?(block) UiBibz::Ui::Ux::Containers::Components::.new(content, , ).tap(&block).render else UiBibz::Ui::Ux::Containers::Components::.new(content, , , &block).render end end |
#group(content = nil, options = nil, html_options = nil, &block) ⇒ Object
65 66 67 |
# File 'lib/ui_bibz/ui/ux/containers/panel.rb', line 65 def group(content = nil, = nil, = nil, &block) @items << UiBibz::Ui::Ux::Containers::Components::PanelGroup.new(content, , ).tap(&block).render end |
#header(content = nil, options = nil, html_options = nil, &block) ⇒ Object
Add Header which is a component
78 79 80 81 82 83 84 |
# File 'lib/ui_bibz/ui/ux/containers/panel.rb', line 78 def header(content = nil, = nil, = nil, &block) @header = if tapped?(block) UiBibz::Ui::Ux::Containers::Components::PanelHeader.new(content, , ).tap(&block).render else UiBibz::Ui::Ux::Containers::Components::PanelHeader.new(content, , , &block).render end end |
#panel(content = nil, options = nil, html_options = nil, &block) ⇒ Object
69 70 71 |
# File 'lib/ui_bibz/ui/ux/containers/panel.rb', line 69 def panel(content = nil, = nil, = nil, &block) @items << UiBibz::Ui::Ux::Containers::Panel.new(content, , ).tap(&block).render end |
#pre_render ⇒ Object
49 50 51 |
# File 'lib/ui_bibz/ui/ux/containers/panel.rb', line 49 def pre_render content_tag :div, html_structure, end |
#toolbar(content = nil, options = nil, html_options = nil, &block) ⇒ Object
53 54 55 |
# File 'lib/ui_bibz/ui/ux/containers/panel.rb', line 53 def (content = nil, = nil, = nil, &block) @items << UiBibz::Ui::Ux::Containers::Components::.new(content, , ).tap(&block).render end |