Sha256: ff19d0a3f3a1d60c647b71ef1492d2ddfcea83c700be8905e5af436ad2c7d8ae
Contents?: true
Size: 945 Bytes
Versions: 7
Compression:
Stored size: 945 Bytes
Contents
module FileAttachmentsHelper def description_display(file_attachment) return unless has_authorization?(:read, file_attachment) content_tag :p, { :id => "file_attachment_#{file_attachment.id}_description", :style => "max-width: 70%; float: right;", :class => 'file_attachment_description' } do file_attachment.description end end def name_display(file_attachment) content_tag :p, { :id => "file_attachment_#{file_attachment.id}_name", :class => 'file_attachment_name' } do link_to_download_file_attachment(file_attachment) end end def file_container_data(file_attachment) return unless has_authorization?(:update, file_attachment) content_tag :span, file_attachment.file_container, { :id => "file_attachment_#{file_attachment.id}_file_container", :class => "file_attachment_file_container", :style => "display:none;" } end end
Version data entries
7 entries across 7 versions & 1 rubygems