Sha256: c9155674d0c93f8b89fa3359667b00e67e1b24904eadc10f210a5096e974a8b0

Contents?: true

Size: 674 Bytes

Versions: 6

Compression:

Stored size: 674 Bytes

Contents

module Gaku::IconHelper

  def boolean_image(field)
    if field
      image_tag('tick.png')
    else
      image_tag('cross.png')
    end
  end

  def resize_image(image_url, options = {})
    raise 'No size given use :size or :width & :height' unless options[:size] || (options[:height] && options[:width])
    height = options[:height] || options[:size]
    width  = options[:width]  || options[:size]
    image_tag(image_url, style: "height:#{height}px;width:#{width}px") unless image_url.blank?
  end

  def calendar_icon
    content_tag(:i, nil, class: ' icon-calendar')
  end

  def download_icon
    content_tag(:i, nil, class: 'icon-white icon-download')
  end

end

Version data entries

6 entries across 6 versions & 2 rubygems

Version Path
gaku_core-0.0.3 app/helpers/gaku/icon_helper.rb
gaku-0.0.3 core/app/helpers/gaku/icon_helper.rb
gaku-0.0.2 core/app/helpers/gaku/icon_helper.rb
gaku_core-0.0.2 app/helpers/gaku/icon_helper.rb
gaku-0.0.1 core/app/helpers/gaku/icon_helper.rb
gaku_core-0.0.1 app/helpers/gaku/icon_helper.rb