public
Description: An extension for Radiant CMS to support file uploads modeled as attachments to pages.
Homepage:
Clone URL: git://github.com/radiant/radiant-page-attachments-extension.git
radiant-page-attachments-extension / page_attachments_extension.rb
100644 28 lines (22 sloc) 0.7 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
require_dependency 'application'
# require File.dirname(__FILE__) + '/lib/geometry'
# require 'tempfile'
 
class PageAttachmentsExtension < Radiant::Extension
  version "0.3"
  description "Adds page-attachment-style asset management."
  url "http://radiantcms.org"
 
   define_routes do |map|
     map.connect 'page_attachments/:action/:id', :controller => 'page_attachments'
   end
 
  def activate
    # Regular page attachments stuff
    Page.class_eval {
      include PageAttachmentAssociations
      include PageAttachmentTags
    }
    UserActionObserver.send :include, ObservePageAttachments
    Admin::PagesController.send :include, PageAttachmentsInterface
  end
 
  def deactivate
  end
 
end