.horizontal-form-label = f.object.title .horizontal-form-content = f.fields_for :partable, f.object.partable do |ff| = link_to admin_media_picker_path(selected_ids: ff.object.image_ids, hidden_field_id: "media_picker_#{ff.object.object_id}", multiple: true), remote: true, class: 'media_picker clearfix' do .placeholder %span.button.button-small.button-round %i.icon.icon-dots =t 'spina.images.choose_images' .image-collection - if ff.object.images.any? = render 'spina/admin/image_collections/image_collection', images: ff.object.images.sorted_by_image_collection = ff.hidden_field :image_tokens, value: ff.object.image_ids.join(","), data: {hidden_field_id: "media_picker_#{ff.object.object_id}"} = ff.hidden_field :image_positions, value: ff.object.images.sorted_by_image_collection.pluck(:image_id).join(","), class: 'image-positions'