Sha256: 162e682e90338755f556ff07fcabe6dba212a09f0befda9fcaf1009c8e0e6828

Contents?: true

Size: 891 Bytes

Versions: 26

Compression:

Stored size: 891 Bytes

Contents

module Refinery
  module Helpers
    module TagHelper

      # 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.
      def refinery_help_tag(title='')
        title = h(title) unless title.html_safe?

        refinery_icon_tag('information', :class => 'help', :tooltip => title)
      end

      # 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.
      def refinery_icon_tag(filename, options = {})
        filename = "#{filename}.png" unless filename.split('.').many?
        image_tag "refinery/icons/#{filename}", {:width => 16, :height => 16}.merge(options)
      end

    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
refinerycms-core-1.0.11 lib/refinery/helpers/tag_helper.rb
refinerycms-core-1.0.10 lib/refinery/helpers/tag_helper.rb
refinerycms-core-1.0.9 lib/refinery/helpers/tag_helper.rb
refinerycms-core-1.0.8 lib/refinery/helpers/tag_helper.rb
refinerycms-core-1.0.7 lib/refinery/helpers/tag_helper.rb
refinerycms-core-1.0.5 lib/refinery/helpers/tag_helper.rb
refinerycms-core-1.0.4 lib/refinery/helpers/tag_helper.rb
refinerycms-core-1.0.3 lib/refinery/helpers/tag_helper.rb
refinerycms-core-1.0.1 lib/refinery/helpers/tag_helper.rb
refinerycms-core-1.0.0 lib/refinery/helpers/tag_helper.rb
refinerycms-core-0.9.9.22 lib/refinery/helpers/tag_helper.rb
refinerycms-core-0.9.9.21 lib/refinery/helpers/tag_helper.rb
refinerycms-core-0.9.9.20 lib/refinery/helpers/tag_helper.rb
refinerycms-core-0.9.9.19 lib/refinery/helpers/tag_helper.rb
refinerycms-core-0.9.9.18 lib/refinery/helpers/tag_helper.rb
refinerycms-core-0.9.9.17 lib/refinery/helpers/tag_helper.rb
refinerycms-core-0.9.9.16 lib/refinery/helpers/tag_helper.rb
refinerycms-core-0.9.9.15 lib/refinery/helpers/tag_helper.rb
refinerycms-core-0.9.9.14 lib/refinery/helpers/tag_helper.rb
refinerycms-core-0.9.9.13 lib/refinery/helpers/tag_helper.rb