function theme_calendar_year in Calendar 5.2
Same name and namespace in other branches
- 5 calendar.theme \theme_calendar_year()
Format a year view
File
- ./
calendar.theme, line 460
Code
function theme_calendar_year($view, $header, $rows) {
$output = '<div class="calendar-calendar"><div class="year-view">';
$rows_out = array();
$row = array();
$i = 1;
foreach ($rows as $month => $month_rows) {
$view->month = $month;
$view->min_date = date_make_date($view->year . '-' . date_pad($view->month) . '-01 00:00:00', date_default_timezone_name());
$month_header = '<div class="date-nav"><div class="date-header"><h3>' . theme('calendar_nav_title', 'month', $view) . '</h3></div></div>';
$row[] = array(
'data' => $month_header . theme('calendar_month', $view, $header, $month_rows),
);
// Group three mini month calendars in each year row.
if ($i == 3) {
$rows_out[] = $row;
$row = array();
$i = 0;
}
$i++;
}
$output .= theme("table", $header, $rows_out, array(
'class' => 'mini',
));
$output .= "</div></div>\n";
return $output;
}