Sha256: 54b89653eb979d146075f5188d50217b7f8a1f87f56bb2339aae499394624c95

Contents?: true

Size: 993 Bytes

Versions: 2

Compression:

Stored size: 993 Bytes

Contents

- if f.object.assets.any?
  = node f, field do
    - imgs = f.object.assets.only_images
    - if imgs.any?
      %h4= t('ksk.asset.list.headline.photos')
      %ol.assets_list.js_sortable{data: {sort_url: sort_entries_path('assets')}}
        - imgs.each do |asset|
          %li{id: "#{asset.id}_images"}
            = render partial: 'bhf/form/has_many/upload', locals: {field: field, f: f, asset: asset, allow_position: !@quick_edit}
    
    - files = f.object.assets.only_data_files
    - if files.any?
      %h4= t('ksk.asset.list.headline.files')
      %ol.assets_list.js_sortable{data: {sort_url: sort_entries_path('assets')}}
        - files.each do |asset|
          %li{id: "#{asset.id}_data_files"}
            = render partial: 'bhf/form/has_many/upload', locals: {field: field, f: f, asset: asset, allow_position: !@quick_edit}

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


Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
ksk-0.3.3 app/views/bhf/form/has_many/_assets.html.haml
ksk-0.3.2 app/views/bhf/form/has_many/_assets.html.haml