Module: Refinery::TagHelper
- Defined in:
- app/helpers/refinery/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.
6 7 8 9 10 |
# File 'app/helpers/refinery/tag_helper.rb', line 6 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.
14 15 16 17 |
# File 'app/helpers/refinery/tag_helper.rb', line 14 def refinery_icon_tag(filename, = {}) filename = "#{filename}.png" unless filename.split('.').many? image_tag "refinery/icons/#{filename}", {:width => 16, :height => 16}.merge() end |