Sha256: aa692dc4697f4075994de5051a0e9099b22c2cfe7d58c9b1f6fb4ce12add5d19

Contents?: true

Size: 870 Bytes

Versions: 13

Compression:

Stored size: 870 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, @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

13 entries across 13 versions & 1 rubygems

Version Path
trusty-clipped-extension-1.1.0 app/views/admin/page_attachments/_attachment.html.haml
trusty-clipped-extension-1.0.11 app/views/admin/page_attachments/_attachment.html.haml
trusty-clipped-extension-1.0.10 app/views/admin/page_attachments/_attachment.html.haml
trusty-clipped-extension-1.0.9 app/views/admin/page_attachments/_attachment.html.haml
trusty-clipped-extension-1.0.8 app/views/admin/page_attachments/_attachment.html.haml
trusty-clipped-extension-1.0.7 app/views/admin/page_attachments/_attachment.html.haml
trusty-clipped-extension-1.0.6 app/views/admin/page_attachments/_attachment.html.haml
trusty-clipped-extension-1.0.5 app/views/admin/page_attachments/_attachment.html.haml
trusty-clipped-extension-1.0.4 app/views/admin/page_attachments/_attachment.html.haml
trusty-clipped-extension-1.0.3 app/views/admin/page_attachments/_attachment.html.haml
trusty-clipped-extension-1.0.2 app/views/admin/page_attachments/_attachment.html.haml
trusty-clipped-extension-1.0.1 app/views/admin/page_attachments/_attachment.html.haml
trusty-clipped-extension-1.0.0 app/views/admin/page_attachments/_attachment.html.haml