Sha256: 3b3f3d623f56a91ebbcecbf58ed758ef9777e1db3407d59cc81ec6338f584eaf
Contents?: true
Size: 928 Bytes
Versions: 1
Compression:
Stored size: 928 Bytes
Contents
- attachable_type ||= attachment.attachable_type.titleize.gsub(" ", "_").gsub('/', '_').downcase - uid = (attachment.persisted? ? attachment.id : Time.now.to_i) - hidden ||= false .asset-box-attachment{:style => "#{(attachment.marked_for_destruction? || hidden) ? 'display: none;' : ''}"} - if attachment.persisted? = hidden_field_tag("#{attachable_type}[attachments_attributes][#{uid}][id]", attachment.id) = hidden_field_tag("#{attachable_type}[attachments_attributes][#{uid}][asset_id]", attachment.asset_id) = hidden_field_tag("#{attachable_type}[attachments_attributes][#{uid}][box]", attachment.box) = hidden_field_tag("#{attachable_type}[attachments_attributes][#{uid}][_destroy]", attachment.marked_for_destruction? ? 1 : nil, :class => 'asset-box-remove') %span.thumbnail= effective_asset_image_tag(attachment.asset, :thumb) %p.title= attachment.asset.title %a.asset-box-remove{:href => '#'} Delete
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
effective_assets-0.1 | app/views/asset_box_input/_attachment_fields.html.haml |