Sha256: 86b35151b7d5c515ed80a4568d1238fe96dbc4159d0aedbaf60472ef3bc811c0
Contents?: true
Size: 1.55 KB
Versions: 1
Compression:
Stored size: 1.55 KB
Contents
class EventCalendarExtension < Radiant::Extension version "1.0.1" description "An event calendar extension that administers events locally or draws them from any ical or CalDAV publishers (Google Calendar, .Mac, Darwin Calendar Server, etc.)" url "http://github.com/radiant/radiant-event_calendar-extension" 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 if Radiant::Config.table_exists? && !Radiant::Config["event_calendar.icals_path"] Radiant::Config["event_calendar.icals_path"] = "icals" end unless defined? admin.calendar Radiant::AdminUI.send :include, EventCalendarAdminUI admin.calendar = Radiant::AdminUI.load_default_calendar_regions admin.event = Radiant::AdminUI.load_default_event_regions admin.event_venue = Radiant::AdminUI.load_default_event_venue_regions end if respond_to?(:tab) tab("Content") do add_item("Calendar", '/admin/event_calendar') end else admin.tabs.add "Calendar", '/admin/event_calendar', :after => "Snippets", :visibility => [:all] end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
radiant-event_calendar-extension-1.0.1 | event_calendar_extension.rb |