function template_preprocess_calendar_datebox in Calendar 7
Same name in this branch
- 7 theme/theme.inc \template_preprocess_calendar_datebox()
- 7 calendar_multiday/theme/theme.inc \template_preprocess_calendar_datebox()
Same name and namespace in other branches
- 8 calendar.theme.inc \template_preprocess_calendar_datebox()
- 6.2 theme/theme.inc \template_preprocess_calendar_datebox()
- 6.2 calendar_multiday/theme/theme.inc \template_preprocess_calendar_datebox()
- 7.3 theme/theme.inc \template_preprocess_calendar_datebox()
- 7.2 theme/theme.inc \template_preprocess_calendar_datebox()
- 7.2 calendar_multiday/theme/theme.inc \template_preprocess_calendar_datebox()
Create the calendar date box.
File
- calendar_multiday/
theme/ theme.inc, line 697 - Theme functions for the Calendar module.
Code
function template_preprocess_calendar_datebox(&$vars) {
$date = $vars['date'];
$view = $vars['view'];
$vars['day'] = intval(substr($date, 8, 2));
$force_view_url = !empty($view->date_info->block) ? TRUE : FALSE;
$vars['url'] = date_real_url($view, NULL, $date, $force_view_url);
$vars['link'] = !empty($view->date_info->display_types['day']) ? l($vars['day'], $vars['url']) : $vars['day'];
$vars['granularity'] = $view->date_info->granularity;
$vars['mini'] = $view->date_info->mini;
if ($view->date_info->mini) {
if (!empty($vars['selected'])) {
$vars['class'] = 'mini-day-on';
}
else {
$vars['class'] = 'mini-day-off';
}
}
else {
$vars['class'] = 'day';
}
}