Sha256: 49e5d85d2af7b1d690fc573f4c3621973ceba9b3196bd67a0667b69e2a8d083c

Contents?: true

Size: 805 Bytes

Versions: 78

Compression:

Stored size: 805 Bytes

Contents

- # no file upload on ajax submit :(
- unless @quick_edit
  = node f, field do
    = f.fields_for field.name do |f_file|
      - file = f.object.send(:read_attribute, field.name)
      - if file.is_a? Hash
        %p.warning= t('bhf.helpers.file.reselect')
      - else
        - file = f.object.send(field.name)
        - if file.is_a? ActionDispatch::Http::UploadedFile
          - file = f.object.send("#{field.name}_was")
        - if file.is_a?(String)
          - if is_image?(file)
            = image_tag file, class: 'uploaded_image'
          - else
            = link_to file, file, class: 'uploaded_file'
        - unless file.blank?
          .file_delete
            = f_file.check_box :delete
            = f_file.label :delete, t('bhf.helpers.file.delete')

      = f_file.file_field :file

Version data entries

78 entries across 78 versions & 1 rubygems

Version Path
bhf-0.7.1 app/views/bhf/entries/form/column/_upload_file.haml
bhf-0.7.0.rc3 app/views/bhf/entries/form/column/_upload_file.haml
bhf-0.7.0.rc2 app/views/bhf/entries/form/column/_upload_file.haml
bhf-0.7.0.rc1 app/views/bhf/entries/form/column/_upload_file.haml
bhf-0.6.32 app/views/bhf/entries/form/column/_upload_file.haml
bhf-0.6.31 app/views/bhf/entries/form/column/_upload_file.haml
bhf-0.6.30 app/views/bhf/entries/form/column/_upload_file.haml
bhf-0.6.29 app/views/bhf/entries/form/column/_file.haml
bhf-0.6.28 app/views/bhf/entries/form/column/_file.haml
bhf-0.6.27 app/views/bhf/entries/form/column/_file.haml
bhf-0.6.26 app/views/bhf/entries/form/column/_file.haml
bhf-0.6.25 app/views/bhf/entries/form/column/_file.haml
bhf-0.6.24 app/views/bhf/entries/form/column/_file.haml
bhf-0.6.23 app/views/bhf/entries/form/column/_file.haml
bhf-0.6.22 app/views/bhf/entries/form/column/_file.haml
bhf-0.6.21 app/views/bhf/entries/form/column/_file.haml
bhf-0.6.20 app/views/bhf/entries/form/column/_file.haml
bhf-0.6.15 app/views/bhf/entries/form/column/_file.haml
bhf-0.6.14 app/views/bhf/entries/form/column/_file.haml
bhf-0.6.13 app/views/bhf/entries/form/column/_file.haml