Sha256: 570b15c0a7abbebfbda1a70a677f492d0ae508c7d5c4d25e941b19d5ae919f49

Contents?: true

Size: 1.12 KB

Versions: 1

Compression:

Stored size: 1.12 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
  See the 
  = link_to('List view', admin_page_attachments_path)
- unless @attachments.blank?
  %ul.gridded
    - @attachments.each do |attachment|
      %li
        .sample= link_to(image_tag(preview_path(attachment)), attachment.public_filename)
        .pageTitle= (attachment.title.blank? ? attachment.filename : attachment.title)
        .pageTitle= link_to attachment.page.title, page_edit_url(attachment.page)
        %span
          - 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>}
          %textarea{:cols => 22, :rows => 4}= code
= will_paginate @attachments
- include_stylesheet 'admin/page_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/grid.html.haml