Sha256: db397f84a135cea6636888fa56b6cd83fcbaa9ec9fa16dc6ff4aea4f28993a6f

Contents?: true

Size: 870 Bytes

Versions: 20

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

20 entries across 20 versions & 3 rubygems

Version Path
radiant-clipped-extension-1.1.2 app/views/admin/page_attachments/_attachment.html.haml
radiant-clipped-extension-add-group-1.1.2 app/views/admin/page_attachments/_attachment.html.haml
radiant-clipped-extension-1.1.1 app/views/admin/page_attachments/_attachment.html.haml
radiant-clipped-extension-1.1.0 app/views/admin/page_attachments/_attachment.html.haml
radiant-clipped-extension-1.0.17 app/views/admin/page_attachments/_attachment.html.haml
radiant-1.0.0 ruby-debug/ruby/1.8/gems/radiant-clipped-extension-1.0.16/app/views/admin/page_attachments/_attachment.html.haml
radiant-clipped-extension-1.0.16 app/views/admin/page_attachments/_attachment.html.haml
radiant-clipped-extension-1.0.15 app/views/admin/page_attachments/_attachment.html.haml
radiant-clipped-extension-1.0.14 app/views/admin/page_attachments/_attachment.html.haml
radiant-clipped-extension-1.0.13 app/views/admin/page_attachments/_attachment.html.haml
radiant-clipped-extension-1.0.12 app/views/admin/page_attachments/_attachment.html.haml
radiant-clipped-extension-1.0.11 app/views/admin/page_attachments/_attachment.html.haml
radiant-clipped-extension-1.0.10 app/views/admin/page_attachments/_attachment.html.haml
radiant-clipped-extension-1.0.9 app/views/admin/page_attachments/_attachment.html.haml
radiant-clipped-extension-1.0.8 app/views/admin/page_attachments/_attachment.html.haml
radiant-clipped-extension-1.0.7 app/views/admin/page_attachments/_attachment.html.haml
radiant-clipped-extension-1.0.6 app/views/admin/page_attachments/_attachment.html.haml
radiant-clipped-extension-1.0.5 app/views/admin/page_attachments/_attachment.html.haml
radiant-clipped-extension-1.0.4 app/views/admin/page_attachments/_attachment.html.haml
radiant-clipped-extension-1.0.3 app/views/admin/page_attachments/_attachment.html.haml