Module: Card::Set::All::Tabs::HtmlFormat
- Extended by:
- Card::Set::AbstractFormat
- Defined in:
- tmpsets/set/mod003-core/all/tabs.rb
Instance Method Summary collapse
- #construct_static_tabs(tab_type) ⇒ Object
- #construct_tab(tabs, name, explicit_options) ⇒ Object
- #construct_tabs(tab_type) ⇒ Object
Instance Method Details
#construct_static_tabs(tab_type) ⇒ Object
50 51 52 53 54 55 56 |
# File 'tmpsets/set/mod003-core/all/tabs.rb', line 50 def construct_static_tabs tab_type tabs = {} card.item_cards.each do |item| tabs[item.name] = nest item, (args) end static_tabs tabs, tab_type end |
#construct_tab(tabs, name, explicit_options) ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'tmpsets/set/mod003-core/all/tabs.rb', line 23 def construct_tab tabs, name, = tabs[:paths][name] = { title: nest(name, view: :title, title: [:title]), path: nest_path(name, ).html_safe } return unless tabs[:active].empty? tabs[:active] = { name: name, content: nest(name, ) } end |
#construct_tabs(tab_type) ⇒ Object
13 14 15 16 17 18 19 20 21 |
# File 'tmpsets/set/mod003-core/all/tabs.rb', line 13 def construct_tabs tab_type tabs = { active: {}, paths: {} } voo.items[:view] ||= :content card.(_render_raw) do |name, | construct_tab tabs, name, end lazy_loading_tabs tabs[:paths], tabs[:active][:name], tabs[:active][:content], type: tab_type end |