Sha256: 5287dfaceaf18a73f529c1a448ccab6e7bc35d0ec81a037de82aeb67099cf38b
Contents?: true
Size: 948 Bytes
Versions: 3
Compression:
Stored size: 948 Bytes
Contents
module Trestle module CardHelper def card(options={}, &block) content_tag(:div, options.slice(:id, :data).merge(class: ["card", options[:class]].compact)) do safe_join([ (content_tag(:div, options[:header], class: "card-header") if options[:header]), content_tag(:div, class: "card-body", &block), (content_tag(:div, options[:footer], class: "card-footer") if options[:footer]) ].compact) end end def panel(options={}, &block) Trestle.deprecator.warn("The panel helper is deprecated and will be removed in future versions of Trestle. Please use the card helper instead.") card(options.merge(header: options[:title]), &block) end def well(options={}, &block) Trestle.deprecator.warn("The well helper is deprecated and will be removed in future versions of Trestle. Please use the card helper instead.") card(options, &block) end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
trestle-0.10.0 | app/helpers/trestle/card_helper.rb |
trestle-0.10.0.pre2 | app/helpers/trestle/card_helper.rb |
trestle-0.10.0.pre | app/helpers/trestle/card_helper.rb |