Sha256: a92ded45ff3d1ba39a1722579829b8be602f8fadf7f09476faf15cf27a6a675c

Contents?: true

Size: 520 Bytes

Versions: 12

Compression:

Stored size: 520 Bytes

Contents

module Alchemy
  module Admin
    module AttachmentsHelper
      include Alchemy::Admin::BaseHelper

      def mime_to_human(mime)
        Alchemy.t(mime, scope: 'mime_types', default: Alchemy.t(:document))
      end

      def attachment_preview_size(attachment)
        case attachment.icon_css_class
        when 'image' then '600x475'
        when 'audio' then '600x190'
        when 'video' then '600x485'
        when 'pdf'   then '600x500'
        else
          '600x145'
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
alchemy_cms-3.6.7 app/helpers/alchemy/admin/attachments_helper.rb
alchemy_cms-3.6.6 app/helpers/alchemy/admin/attachments_helper.rb
alchemy_cms-3.6.5 app/helpers/alchemy/admin/attachments_helper.rb
alchemy_cms-3.6.4 app/helpers/alchemy/admin/attachments_helper.rb
alchemy_cms-3.6.3 app/helpers/alchemy/admin/attachments_helper.rb
alchemy_cms-3.6.2 app/helpers/alchemy/admin/attachments_helper.rb
alchemy_cms-3.6.1 app/helpers/alchemy/admin/attachments_helper.rb
alchemy_cms-4.0.0.beta app/helpers/alchemy/admin/attachments_helper.rb
alchemy_cms-3.6.0 app/helpers/alchemy/admin/attachments_helper.rb
alchemy_cms-3.5.0 app/helpers/alchemy/admin/attachments_helper.rb
alchemy_cms-3.5.0.rc2 app/helpers/alchemy/admin/attachments_helper.rb
alchemy_cms-3.5.0.rc1 app/helpers/alchemy/admin/attachments_helper.rb