Sha256: 8216d1cbca4c370333e4222bf5044b51fd41bfb8de461a0894eccc2ca6430d97
Contents?: true
Size: 1.72 KB
Versions: 1
Compression:
Stored size: 1.72 KB
Contents
# Uncomment this if you reference any of your controllers in activate # require_dependency 'application_controller' require "radiant-event_calendar-extension" class EventCalendarExtension < Radiant::Extension version RadiantEventCalendarExtension::VERSION description RadiantEventCalendarExtension::DESCRIPTION url RadiantEventCalendarExtension::URL extension_config do |config| config.gem "ri_cal" config.gem "chronic" config.gem "uuidtools" end def activate Page.send :include, EventCalendarTags # defines a wide range of events: tags for use on normal and calendar pages Status.send :include, EventStatuses # adds support for draft and submitted events UserActionObserver.instance.send :add_observer!, Calendar # adds ownership and update hooks to the calendar data UserActionObserver.instance.send :add_observer!, Event # adds ownership and update hooks to the event data Radiant::AdminUI.send :include, EventCalendarAdminUI # defines shards for further extension of the calendar admin pages Radiant::AdminUI.load_event_calendar_regions admin.configuration.show.add :config, 'admin/configuration/calendar_show', :after => 'defaults' admin.configuration.edit.add :form, 'admin/configuration/calendar_edit', :after => 'edit_defaults' admin.dashboard.index.add(:main, "coming_events", :before => 'recent_assets') if admin.respond_to? :dashboard tab('Calendar') do add_item('Events', '/admin/event_calendar') add_item('Calendars', '/admin/event_calendar/calendars') add_item('Locations', '/admin/event_calendar/event_venues') end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
radiant-event_calendar-extension-1.4.14 | event_calendar_extension.rb |