Sha256: b6c097e4cd5467e8bd6a5417e7ed4f8ecd307a18ad5a84a74081bf6b251ff511

Contents?: true

Size: 705 Bytes

Versions: 9

Compression:

Stored size: 705 Bytes

Contents

- # no file upload on ajax submit :(
- unless @quick_edit
  = node f, field do
    - file = f.object.send(field.name)
    - if file.file?
      - if ['image/jpeg', 'image/pjpeg', 'image/jpg', 'image/png', 'image/tif', 'image/gif'].include?(f.object.send("#{field.name}_content_type"))
        = image_tag file.url, class: 'uploaded_image'
      - else
        = link_to f.object.send("#{field.name}_file_name"), file.url, class: 'uploaded_file'

      - if f.object.respond_to?(:"#{field.name}_destroy")
        .file_delete
          = f.check_box "#{field.name}_destroy"
          = f.label "#{field.name}_destroy", t('bhf.helpers.file.delete')

    - unless @quick_edit
      = f.file_field field.name

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
bhf-0.7.12 app/views/bhf/entries/form/column/_paperclip.haml
bhf-0.7.11 app/views/bhf/entries/form/column/_paperclip.haml
bhf-0.7.9 app/views/bhf/entries/form/column/_paperclip.haml
bhf-0.7.8 app/views/bhf/entries/form/column/_paperclip.haml
bhf-0.7.7 app/views/bhf/entries/form/column/_paperclip.haml
bhf-0.7.5 app/views/bhf/entries/form/column/_paperclip.haml
bhf-0.7.4 app/views/bhf/entries/form/column/_paperclip.haml
bhf-0.7.3 app/views/bhf/entries/form/column/_paperclip.haml
bhf-0.7.2 app/views/bhf/entries/form/column/_paperclip.haml