class UiBibz::Ui::Ux::Containers::Panel
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.toolbar do |t| t.btn_group do |bg| bg.button 'button' end end p.body 'body' p.footer 'footer' end
Public Class Methods
new(content = nil, options = nil, html_options = nil, &block)
click to toggle source
Calls superclass method
UiBibz::Ui::Core::Component::new
# File lib/ui_bibz/ui/ux/containers/panel.rb, line 44 def initialize(content = nil, options = nil, html_options = nil, &block) super @items = [] end
Public Instance Methods
body(content = nil, options = nil, html_options = nil, &block)
click to toggle source
# File lib/ui_bibz/ui/ux/containers/panel.rb, line 73 def body(content = nil, options = nil, html_options = nil, &block) @items << UiBibz::Ui::Ux::Containers::Components::PanelBody.new(content, options, html_options, &block).render end
column(content = nil, options = nil, html_options = nil, &block)
click to toggle source
# File lib/ui_bibz/ui/ux/containers/panel.rb, line 61 def column(content = nil, options = nil, html_options = nil, &block) @items << UiBibz::Ui::Ux::Containers::Components::PanelColumn.new(content, options, html_options).tap(&block).render end
deck(content = nil, options = nil, html_options = nil, &block)
click to toggle source
# File lib/ui_bibz/ui/ux/containers/panel.rb, line 57 def deck(content = nil, options = nil, html_options = nil, &block) @items << UiBibz::Ui::Ux::Containers::Components::PanelDeck.new(content, options, html_options).tap(&block).render end
group(content = nil, options = nil, html_options = nil, &block)
click to toggle source
# File lib/ui_bibz/ui/ux/containers/panel.rb, line 65 def group(content = nil, options = nil, html_options = nil, &block) @items << UiBibz::Ui::Ux::Containers::Components::PanelGroup.new(content, options, html_options).tap(&block).render end
header(content = nil, options = nil, html_options = nil, &block)
click to toggle source
Add Header which is a component
# File lib/ui_bibz/ui/ux/containers/panel.rb, line 78 def header(content = nil, options = nil, html_options = nil, &block) @header = if tapped?(block) UiBibz::Ui::Ux::Containers::Components::PanelHeader.new(content, options, html_options).tap(&block).render else UiBibz::Ui::Ux::Containers::Components::PanelHeader.new(content, options, html_options, &block).render end end
panel(content = nil, options = nil, html_options = nil, &block)
click to toggle source
# File lib/ui_bibz/ui/ux/containers/panel.rb, line 69 def panel(content = nil, options = nil, html_options = nil, &block) @items << UiBibz::Ui::Ux::Containers::Panel.new(content, options, html_options).tap(&block).render end
pre_render()
click to toggle source
# File lib/ui_bibz/ui/ux/containers/panel.rb, line 49 def pre_render content_tag :div, html_structure, html_options end
toolbar(content = nil, options = nil, html_options = nil, &block)
click to toggle source
# File lib/ui_bibz/ui/ux/containers/panel.rb, line 53 def toolbar(content = nil, options = nil, html_options = nil, &block) @items << UiBibz::Ui::Ux::Containers::Components::PanelToolbar.new(content, options, html_options).tap(&block).render end
Private Instance Methods
component_html_classes()
click to toggle source
Calls superclass method
UiBibz::Ui::Core::Component#component_html_classes
# File lib/ui_bibz/ui/ux/containers/panel.rb, line 101 def component_html_classes super << 'panel' end
html_structure()
click to toggle source
# File lib/ui_bibz/ui/ux/containers/panel.rb, line 97 def html_structure [@header, @items.join, @footer].compact.join.html_safe end