Sha256: 3224c2d95c58a8738b75b946f7c06c1f8fdfec06f8842a6e29e91e0ec681bd0b
Contents?: true
Size: 863 Bytes
Versions: 4
Compression:
Stored size: 863 Bytes
Contents
- attachment ||= @page_attachment - page = attachment.page - asset = attachment.asset - asset_type = asset.image? ? "image" : "link" - css_class = "#{asset_type} asset" - css_class += ' unsaved' if attachment.new_record? %li{:class => css_class, :id => "attachment_#{asset.uuid}"} - fields_for @page do |f| - f.fields_for :page_attachments, attachment, :child_index => asset.uuid do |paf| - if attachment.new_record? = paf.hidden_field :asset_id, :class => 'attacher' - else = paf.hidden_field :_destroy, :class => 'destroyer' = paf.hidden_field :position, :class => 'pos' .front .thumbnail= image_tag asset.thumbnail(:thumbnail) .back .title= asset.title %ul.actions %li = asset_insertion_link(asset) %li = link_to t('clipped_extension.detach'), '#', :class => 'detach_asset'
Version data entries
4 entries across 4 versions & 2 rubygems