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.6.12 app/views/bhf/entries/form/column/_file.haml
bhf-0.6.11 app/views/bhf/entries/form/column/_file.haml
bhf-0.6.10 app/views/bhf/entries/form/column/_file.haml
bhf-0.6.6 app/views/bhf/entries/form/column/_file.haml
bhf-0.6.5 app/views/bhf/entries/form/column/_file.haml
bhf-0.6.4 app/views/bhf/entries/form/column/_file.haml
bhf-0.6.3 app/views/bhf/entries/form/column/_file.haml
bhf-0.6.2 app/views/bhf/entries/form/column/_file.haml
bhf-0.6.1 app/views/bhf/entries/form/column/_file.haml
bhf-0.6.0 app/views/bhf/entries/form/column/_file.haml
bhf-0.5.13 app/views/bhf/entries/form/column/_file.haml
bhf-0.5.12 app/views/bhf/entries/form/column/_file.haml
bhf-0.5.11 app/views/bhf/entries/form/column/_file.haml
bhf-0.5.10 app/views/bhf/entries/form/column/_file.haml
bhf-0.5.9 app/views/bhf/entries/form/column/_file.haml
bhf-0.5.8 app/views/bhf/entries/form/column/_file.haml
bhf-0.5.7 app/views/bhf/entries/form/column/_file.haml
bhf-0.5.6 app/views/bhf/entries/form/column/_file.haml
bhf-0.5.5 app/views/bhf/entries/form/column/_file.haml
bhf-0.5.4 app/views/bhf/entries/form/column/_file.haml