Sha256: abfb73887d3fca286eda73e33188c9587ec7c97a7f118b41bead34742c81d71c
Contents?: true
Size: 829 Bytes
Versions: 16
Compression:
Stored size: 829 Bytes
Contents
format :html do view :demo do frame do [view_select, wrap_with(:div, view_demo, class: "demo-slot")] end end view :view_list do %i[bar box info_bar open closed titled labeled content content_panel].map do |v| wrap_with :p, [content_tag(:h3, v), render(v, show: :menu)] end.flatten.join "" end def demo_view Env.params[:demo_view] || :core end def view_demo wrap(true) do render demo_view end end def view_select card_form :get, success: { view: :demo } do select_tag :demo_view, options_for_select(all_views, demo_view), class: "_submit-on-select" end end def all_views Card::Set::Format::AbstractFormat::ViewDefinition .views.slice(*self.class.ancestors).values.map(&:keys).flatten.uniq end end
Version data entries
16 entries across 16 versions & 1 rubygems