Sha256: 311bca2d7696862c240caa78fc6e509a494d77e35dbc252fec0d591fc21df1a3

Contents?: true

Size: 811 Bytes

Versions: 21

Compression:

Stored size: 811 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

21 entries across 21 versions & 1 rubygems

Version Path
bhf-0.4.2.2 app/views/bhf/entries/form/column/_file.haml
bhf-0.4.2.1 app/views/bhf/entries/form/column/_file.haml
bhf-0.4.2 app/views/bhf/entries/form/column/_file.haml
bhf-0.4.1 app/views/bhf/entries/form/column/_file.haml
bhf-0.4.0 app/views/bhf/entries/form/column/_file.haml
bhf-0.3.11 app/views/bhf/entries/form/column/_file.haml
bhf-0.3.10 app/views/bhf/entries/form/column/_file.haml
bhf-0.3.9 app/views/bhf/entries/form/column/_file.haml
bhf-0.3.8 app/views/bhf/entries/form/column/_file.haml
bhf-0.3.7 app/views/bhf/entries/form/column/_file.haml
bhf-0.3.6.4 app/views/bhf/entries/form/column/_file.haml
bhf-0.3.6.3 app/views/bhf/entries/form/column/_file.haml
bhf-0.3.6.2 app/views/bhf/entries/form/column/_file.haml
bhf-0.3.6.1 app/views/bhf/entries/form/column/_file.haml
bhf-0.3.5 app/views/bhf/entries/form/column/_file.haml
bhf-0.3.4 app/views/bhf/entries/form/column/_file.haml
bhf-0.3.3 app/views/bhf/entries/form/column/_file.haml
bhf-0.3.2 app/views/bhf/entries/form/column/_file.haml
bhf-0.3.1 app/views/bhf/entries/form/column/_file.haml
bhf-0.3.0 app/views/bhf/entries/form/column/_file.haml