forked from SamWhited/radiant-dtconfig-extension
-
Notifications
You must be signed in to change notification settings - Fork 0
/
dtconfig_extension.rb
37 lines (30 loc) · 1.34 KB
/
dtconfig_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
# Uncomment this if you reference any of your controllers in activate
# require_dependency "application_controller"
require "radiant-dtconfig-extension"
class DtconfigExtension < Radiant::Extension
version RadiantDtconfigExtension::VERSION
description RadiantDtconfigExtension::DESCRIPTION
url RadiantDtconfigExtension::URL
# See your config/routes.rb file in this extension to define custom routes
extension_config do |config|
end
def activate
# Activate custom DramaTech radius tags
Page.class_eval do
include DramatechTags
end
# Configure the minutes extension
if defined? MinutesExtension
MinutesExtension.minutes_path = '/greenroom/minutes/'
MinutesExtension.meeting_types = ['Club', 'EC', 'PPM', 'Open House', 'Banquet', 'Historian', 'Social', 'Production', 'Post Mortem', 'PRC', 'Other']
end
# Configure the news extension
if defined? NewsExtension
NewsExtension.news_types = ['Public', 'Greenroom']
NewsExtension.news_paths = ['/news/', '/greenroom/news/']
end
# Set the title of the admin interface
Radiant::Config['admin.title'] = 'DramaTech Theat(er|re)' if Radiant::Config['admin.title'] =~ /Radiant CMS/
Radiant::Config['admin.subtitle'] = 'Music, theater, toasters' if Radiant::Config['admin.subtitle'] =~ /Publishing for Small Teams/
end
end