-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdigg_extension.rb
43 lines (33 loc) · 1.11 KB
/
digg_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
31
32
33
34
35
36
37
38
39
40
41
42
43
# Uncomment this if you reference any of your controllers in activate
# require_dependency 'application'
class DiggExtension < Radiant::Extension
# version "1.0"
# description "Describe your extension here"
# url "http://yourwebsite.com/digg"
# define_routes do |map|
# map.connect 'admin/digg/:action', :controller => 'admin/digg'
# end
# def activate
# admin.tabs.add "Digg", "/admin/digg", :after => "Layouts", :visibility => [:all]
# end
# def deactivate
# admin.tabs.remove "Digg"
# end
version "1.0"
description "Describe your extension here"
url "http://yourwebsite.com/link_roll"
define_routes do |map|
# map.connect 'admin/link_roll/:action', :controller => 'admin/link_roll'
map.namespace :admin, :member=> { :remove => :get } do |admin|
admin.resources :digg
end
end
def activate
# admin.tabs.add "Link Roll", "/admin/link_roll", :after => "Layouts", :visibility => [:all]
admin.tabs.add "DIGG", "/admin/diggs", :after => "Pages"
Page.send :include, DiggTags
end
def deactivate
# admin.tabs.remove "Link Roll"
end
end