Sha256: 988994e68edecbe137acbe76e99a2f6d0c6b00b7f84ebc0e491a078cf24ffa48

Contents?: true

Size: 869 Bytes

Versions: 19

Compression:

Stored size: 869 Bytes

Contents

- file = form.object.send(field.method_name).presence

.toggle{:style => ('display:none;' if file && field.delete_method && form.object.send(field.delete_method) == '1')}
  - if value = field.pretty_value
    = value
  = form.file_field(field.name, field.html_attributes.reverse_merge({ :data => { :fileupload => true }}))
- if field.optional? && field.errors.blank? && file && field.delete_method
  %a.btn.btn-info{:href => '#', :'data-toggle' => 'button', :onclick => "$(this).siblings('[type=checkbox]').click(); $(this).siblings('.toggle').toggle('slow'); jQuery(this).toggleClass('btn-danger btn-info'); return false"}
    %i.icon-white.icon-trash
    = I18n.t('admin.actions.delete.menu').capitalize + " #{field.label.downcase}"
  = form.check_box(field.delete_method, :style => 'display:none;' )
- if field.cache_method
  = form.hidden_field(field.cache_method)

Version data entries

19 entries across 19 versions & 2 rubygems

Version Path
rails_admin-0.6.1 app/views/rails_admin/main/_form_file_upload.html.haml
rails_admin-0.6.0 app/views/rails_admin/main/_form_file_upload.html.haml
rails_admin-0.5.0 app/views/rails_admin/main/_form_file_upload.html.haml
rails_admin-0.4.9 app/views/rails_admin/main/_form_file_upload.html.haml
rails_admin-0.4.8 app/views/rails_admin/main/_form_file_upload.html.haml
rails_admin-0.4.7 app/views/rails_admin/main/_form_file_upload.html.haml
rails_admin-0.4.6 app/views/rails_admin/main/_form_file_upload.html.haml
rails_admin-0.4.5 app/views/rails_admin/main/_form_file_upload.html.haml
rails_admin-0.4.4 app/views/rails_admin/main/_form_file_upload.html.haml
rails_admin-lbgraham-0.4.2 app/views/rails_admin/main/_form_file_upload.html.haml
rails_admin-0.4.3 app/views/rails_admin/main/_form_file_upload.html.haml
rails_admin-0.4.2 app/views/rails_admin/main/_form_file_upload.html.haml
rails_admin-0.4.1 app/views/rails_admin/main/_form_file_upload.html.haml
rails_admin-0.4.0 app/views/rails_admin/main/_form_file_upload.html.haml
rails_admin-0.3.0 app/views/rails_admin/main/_form_file_upload.html.haml
rails_admin-0.2.0 app/views/rails_admin/main/_form_file_upload.html.haml
rails_admin-0.1.2 app/views/rails_admin/main/_form_file_upload.html.haml
rails_admin-0.1.1 app/views/rails_admin/main/_form_file_upload.html.haml
rails_admin-0.1.0 app/views/rails_admin/main/_form_file_upload.html.haml