forked from Aissac/radiant-stereotype-extension
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathstereotype_extension.rb
30 lines (24 loc) · 986 Bytes
/
stereotype_extension.rb
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
29
30
# Uncomment this if you reference any of your controllers in activate
require_dependency 'application_controller'
class StereotypeExtension < Radiant::Extension
version "1.0"
description "Define templates for Pages' children in Radiant CMS."
url "http://blog.aissac.ro/radiant/stereotype-extension/"
# define_routes do |map|
# map.namespace :admin, :member => { :remove => :get } do |admin|
# admin.resources :stereotype
# end
# end
def activate
Page.send :include, Stereotype::PageExtensions
Admin::PagesController.class_eval do
include Stereotype::PagesControllerExtensions
end
admin.page.edit.add :parts_bottom, "admin/stereotype", :after => "edit_layout_and_type"
admin.page.index.add :sitemap_head, 'admin/stereotype_th', :after => "remove_child_column"
admin.page.index.add :node, 'admin/stereotype_td', :after => "remove_child_column"
end
def deactivate
# admin.tabs.remove "Stereotype"
end
end