Sha256: e7af00343e3a8508a0778845c1be8e601ec9fdddc76c70f22fd8aaa65c411930
Contents?: true
Size: 862 Bytes
Versions: 9
Compression:
Stored size: 862 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 view_list.map do |v| wrap_with :p, [content_tag(:h3, v), render(v, show: :menu)] end.flatten.join "" end def view_list %i[content titled labeled bar box open closed content_panel] 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.sort end end
Version data entries
9 entries across 9 versions & 1 rubygems