Sha256: 8a1c1625e019e6db13b981351868ce5b5ee3eef2ee0753bea80ba4bc6f71035a

Contents?: true

Size: 824 Bytes

Versions: 6

Compression:

Stored size: 824 Bytes

Contents

module Refinery
  module Helpers
    module TagHelper

      # Returns <span class='help' title='Your Input'>(help)</span>
      # 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?

        "<span class=\"help\" title=\"#{title}\">(#{t('help', :scope => 'shared.admin')})</span>".html_safe
      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 = {})
        image_tag "refinery/icons/#{filename}", {:width => 16, :height => 16}.merge(options)
      end

    end
  end
end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
refinerycms-core-0.9.9.5 lib/refinery/helpers/tag_helper.rb
refinerycms-core-0.9.9.4 lib/refinery/helpers/tag_helper.rb
refinerycms-core-0.9.9.3 lib/refinery/helpers/tag_helper.rb
refinerycms-core-0.9.9.2 lib/refinery/helpers/tag_helper.rb
refinerycms-core-0.9.9.1 lib/refinery/helpers/tag_helper.rb
refinerycms-0.9.9 core/lib/refinery/helpers/tag_helper.rb