Module: Card::Set::All::Demo::HtmlFormat
- Extended by:
- Card::Set::AbstractFormat
- Defined in:
- platypus/tmp/set/gem-defaults/mod004-format/all/demo.rb
Instance Method Summary collapse
-
#all_views ⇒ Object
-
#all_views_from_admin_config ⇒ Object
-
#demo_view ⇒ Object
-
#view: demo ⇒ Object
-
#view: view_list ⇒ Object
-
#view_demo ⇒ Object
-
#view_list ⇒ Object
-
#view_select ⇒ Object
Instance Method Details
#all_views ⇒ Object
47 48 49 50 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/demo.rb', line 47 def all_views Card::Set::Format::AbstractFormat::ViewDefinition .views.slice(*self.class.ancestors).values.map(&:keys).flatten.uniq.sort end |
#all_views_from_admin_config ⇒ Object
43 44 45 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/demo.rb', line 43 def all_views_from_admin_config card.all_admin_configs_of_category("views").map(&:codename) end |
#demo_view ⇒ Object
25 26 27 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/demo.rb', line 25 def demo_view Env.params[:demo_view] || :core end |
#view: demo ⇒ Object
9 10 11 12 13 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/demo.rb', line 9 view :demo do frame do [view_select, wrap_with(:div, view_demo, class: "demo-slot")] end end |
#view: view_list ⇒ Object
15 16 17 18 19 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/demo.rb', line 15 view :view_list do view_list.map do |v| wrap_with :p, [content_tag(:h3, v), render(v, show: :menu)] end.flatten.join "" end |
#view_demo ⇒ Object
29 30 31 32 33 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/demo.rb', line 29 def view_demo wrap(true) do render demo_view end end |
#view_list ⇒ Object
21 22 23 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/demo.rb', line 21 def view_list %i[content titled labeled bar box open closed] end |
#view_select ⇒ Object
35 36 37 38 39 40 41 |
# File 'platypus/tmp/set/gem-defaults/mod004-format/all/demo.rb', line 35 def view_select card_form :get, success: { view: :demo } do select_tag :demo_view, (all_views_from_admin_config, demo_view), class: "_submit-on-select" end end |