Sha256: 07c76f5863c60875af5d3bb71faa19fc2dc77019a49bad00529ed06cad83142e

Contents?: true

Size: 845 Bytes

Versions: 9

Compression:

Stored size: 845 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 type_is_image?(file.content_type)
        = link_to image_tag(find_smallest_size_url_for_file(file), class: 'uploaded_image'), file.url
      - else
        = link_to file.original_filename, 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')
          
    %a.qe_button.ninja_file_field_holder.default_form_align{data: {empty_field_text: t('bhf.helpers.form.file_field.select')}}
      %span.h_text= t('bhf.helpers.form.file_field.select')
      = f.file_field field.name, class: 'ninja_file_field'

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
bhf-0.10.12 app/views/bhf/form/column/_paperclip.html.haml
bhf-0.10.11 app/views/bhf/form/column/_paperclip.html.haml
bhf-0.10.10 app/views/bhf/form/column/_paperclip.html.haml
bhf-0.10.9 app/views/bhf/form/column/_paperclip.html.haml
bhf-0.9.9 app/views/bhf/form/column/_paperclip.html.haml
bhf-0.9.8 app/views/bhf/form/column/_paperclip.haml
bhf-0.9.7 app/views/bhf/form/column/_paperclip.haml
bhf-0.9.6 app/views/bhf/form/column/_paperclip.haml
bhf-0.9.5 app/views/bhf/form/column/_paperclip.haml