Sha256: cc21e012137a7968e1a15399314eb12a1b1cc474d3f634e9afbc3d99c4132f95

Contents?: true

Size: 297 Bytes

Versions: 51

Compression:

Stored size: 297 Bytes

Contents

module Noodall::Admin::AssetsHelper

  def asset_icon(asset)
    icon = case asset.file_ext
    when "doc", "pdf", "txt", "xls"
      "admin/#{asset.file_ext}-icon.png"
    else
      "admin/no-type-icon.png"
    end

    image_tag icon, :title => "#{asset.title} - #{asset.file.name}"
  end

end

Version data entries

51 entries across 51 versions & 1 rubygems

Version Path
noodall-ui-0.3.15 app/helpers/noodall/admin/assets_helper.rb
noodall-ui-0.3.14 app/helpers/noodall/admin/assets_helper.rb
noodall-ui-0.3.13 app/helpers/noodall/admin/assets_helper.rb
noodall-ui-0.3.12 app/helpers/noodall/admin/assets_helper.rb
noodall-ui-0.3.11 app/helpers/noodall/admin/assets_helper.rb
noodall-ui-0.3.8 app/helpers/noodall/admin/assets_helper.rb
noodall-ui-0.3.7 app/helpers/noodall/admin/assets_helper.rb
noodall-ui-0.3.6 app/helpers/noodall/admin/assets_helper.rb
noodall-ui-0.3.5 app/helpers/noodall/admin/assets_helper.rb
noodall-ui-0.3.4 app/helpers/noodall/admin/assets_helper.rb
noodall-ui-0.3.3 app/helpers/noodall/admin/assets_helper.rb