Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
22 lines (18 sloc) 666 Bytes
# Uncomment this if you reference any of your controllers in activate
# require_dependency 'application'
class ChangeAuthorExtension < Radiant::Extension
version "1.0"
description "Allows administrators to change the author of a page."
url "http://saturnflyer.com/"
def activate
if ActiveRecord::Base.connection.tables.include?('config')
Radiant::Config['roles.pages.allow_author_change'] = true unless Radiant::Config['roles.pages.allow_author_change']
end
admin.page.edit.add :form, 'author_select'
if admin.respond_to?(:help)
admin.help.index.add :page_type, "author_select"
end
end
def deactivate
end
end