Sha256: 50bb42b5b735605ff06748665b7e17dc2d760c19664dd7ea7f96e07f0d7f75d1
Contents?: true
Size: 714 Bytes
Versions: 23
Compression:
Stored size: 714 Bytes
Contents
module DocumentsHelper # Return document thumbnail/icon def document_image_tag(document) if !(document.attachment.content_type =~ /^image/).nil? image_tag document.attachment(:micro) else image_tag 'icons/file_extension/file_extension_' + (Document::FILE_EXTENSION_ICON[document.attachment.content_type].presence || '') + '.png' end end # Return document thumbnail/icon def document_image_path(document) if !(document.attachment.content_type =~ /^image/).nil? document.attachment(:micro) else '/assets/icons/file_extension/file_extension_' + (Document::FILE_EXTENSION_ICON[document.attachment.content_type].presence || '') + '.png' end end end
Version data entries
23 entries across 23 versions & 1 rubygems