Sha256: d59cd301ab8d6ed07bbab0bd36505cc3f2956d158fecec1f21a7fb21c7a5e262

Contents?: true

Size: 1.16 KB

Versions: 1

Compression:

Stored size: 1.16 KB

Contents

%h1 Page Attachments
%p Below you'll find a list of all page attachments on your site. You may click to view the attachment file, click to edit the attached page, or use the sample code as a starting point for displaying a particular file on a page.
/ %p
/   Try the 
/   = link_to('Grid view', admin_page_attachments_grid_path)
%table.index
  %tr
    %th Attachment
    %th Page
    %th Code
  - unless @attachments.blank?
    - @attachments.each do |attachment|
      %tr
        %td
          = link_to((attachment.title.blank? ? attachment.filename : attachment.title), edit_admin_page_attachment_path(attachment))
          = link_to('(view)', attachment.filename)
        %td= link_to attachment.page.title, page_edit_url(attachment.page)
        %td
          - if attachment.filename.match(/\.(jpg|gif|png|jpeg|tiff?)$/)
            - code = %{<r:attachment name="#{attachment.filename}" url="#{attachment.page.url}"><r:image /></r:attachment>}
          - else
            - code = %{<r:attachment name="#{attachment.filename}" url="#{attachment.page.url}"><r:link /></r:attachment>}
          %input{:type => 'text', :size => 40, :value => code}
= will_paginate @attachments

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
radiant-page_attachments-extension-1.0.2 app/views/admin/page_attachments/index.html.haml