Module: Refinery::Helpers::TagHelper
- Defined in:
- lib/refinery/helpers/tag_helper.rb
Instance Method Summary collapse
-
#refinery_help_tag(title = '') ⇒ Object
Returns <img class=‘help’ tooltip=‘Your Input’ src=‘refinery/icons/information.png’ /> Remember to wrap your block with <span class=‘label_with_help’></span> if you’re using a label next to the help tag.
-
#refinery_icon_tag(filename, options = {}) ⇒ Object
This is just a quick wrapper to render an image tag that lives inside refinery/icons.
Instance Method Details
#refinery_help_tag(title = '') ⇒ Object
Returns <img class=‘help’ tooltip=‘Your Input’ src=‘refinery/icons/information.png’ /> Remember to wrap your block with <span class=‘label_with_help’></span> if you’re using a label next to the help tag.
7 8 9 10 11 |
# File 'lib/refinery/helpers/tag_helper.rb', line 7 def refinery_help_tag(title='') title = h(title) unless title.html_safe? refinery_icon_tag('information', :class => 'help', :tooltip => title) end |
#refinery_icon_tag(filename, options = {}) ⇒ Object
This is just a quick wrapper to render an image tag that lives inside refinery/icons. They are all 16x16 so this is the default but is able to be overriden with supplied options.
15 16 17 18 |
# File 'lib/refinery/helpers/tag_helper.rb', line 15 def refinery_icon_tag(filename, = {}) filename = "#{filename}.png" unless filename.split('.').many? image_tag "refinery/icons/#{filename}", {:width => 16, :height => 16}.merge() end |