Sha256: cc6cad618893012a2f84a714bc5972287f29f88b99ef5585a79f6c029c0e2b37

Contents?: true

Size: 1006 Bytes

Versions: 3

Compression:

Stored size: 1006 Bytes

Contents

- if f.object.assets.any?
  = node f, field do
    - f.object.assets.each do |asset|
      = f.fields_for field.name, asset do |a|
        - if asset.file.file?
          - if asset.is_image?
            = image_tag asset.file.url(:medium), class: :uploaded_image
          - else
            = link_to asset.file_file_name, asset.file.url, class: :uploaded_file

          .file_delete
            = a.check_box :_destroy
            = a.label :_destroy, t('bhf.helpers.file.delete')
          %hr

- unless @quick_edit
  = node f, field do
    .array_holder
      = f.fields_for field.name, Asset.new do |a|
        = a.file_field :file


-#
  new Sortables(sortableElems, {
  	handle: '.handle',
  	onStart: function(element, clone){
  		element.addClass('dragged');
  	},
  	onComplete: function(element){
  		element.removeClass('dragged');
  		new Request({
  			method: 'put',
  			url: this.element.getParent('tbody').get('data-sort-url')
  		}).send({data: {order: this.serialize()}});
  	}
  });

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
ksk-0.1.7 app/views/bhf/entries/form/has_many/__assets.html.haml
ksk-0.1.6 app/views/bhf/entries/form/has_many/__assets.html.haml
ksk-0.1.5 app/views/bhf/entries/form/has_many/__assets.html.haml