Yancy
Yancy copied to clipboard
Calendar controller
The Yancy::Controller::Yancy::Calendar contains actions to display items containing calendar event information:
This controller will have all the actions from Yancy::Controller::Yancy and the following new ones:
-
month- A month view of events- Takes the following configuration:
-
collection- The collection to view -
start_field- The field in the item containing the event's start date/time in ISO8601 format -
end_field- (optional) The field in the item containing the event's end date/time in ISO8601 format -
year- The year to view (four-digit year) -
month- The month to view (number, 01-12)
-
- Creates the following stash values for templates
-
days- An array of hashes of day information including the following keys:-
date- A Time::Piece object containing the date information, including year, month, and day -
items- The events that start, end, or cross this day
-
-
- Takes the following configuration:
-
week- A week view of events- Takes the following configuration
-
collection- The collection to view -
start_field- The field in the item containing the event's start date/time in ISO8601 format -
end_field- (optional) The field in the item containing the event's end date/time in ISO8601 format -
year- The year to view (four-digit year) -
month- The month to view (number, 01-12) -
day- The day to start showing the week of events (number, 00-31)
-
- Creates the following stash values for templates
-
hours- An array of hashes of hour information including the following keys:-
hour- A Time::Piece object containing the date information, including year, month, day, and hour -
items- The events that start, end, or cross this hour
-
-
- Takes the following configuration
-
day- A day view of events- Takes the following configuration
-
collection- The collection to view -
start_field- The field in the item containing the event's start date/time in ISO8601 format -
end_field- (optional) The field in the item containing the event's end date/time in ISO8601 format -
year- The year to view (four-digit year) -
month- The month to view (number, 01-12) -
day- The day to view (number, 00-31)
-
- Creates the following stash values for templates
-
hours- An array of hashes of hour information including the following keys:-
hour- A Time::Piece object containing the date information, including year, month, day, and hour -
items- The events that start, end, or cross this hour
-
-
- Takes the following configuration
An example application should be added to eg/ to demonstrate this controller.