function theme_calendar_view_table in Calendar 5.2
Same name and namespace in other branches
- 5 calendar.theme \theme_calendar_view_table()
Display the nodes of a view as a table.
1 theme call to theme_calendar_view_table()
- theme_calendar_views_calendar in ./
calendar.theme - Calendar Views plugin theme, overrides default views theme to create a calendar view.
File
- ./
calendar.theme, line 121
Code
function theme_calendar_view_table($view, $nodes, $type) {
$output = '<div class="calendar-calendar">';
$output .= theme('calendar_links', $view, $view->build_type != 'block');
$output .= theme('calendar_nav', $view);
$output .= '</div>';
$fields = _views_get_fields();
$rows = array();
foreach ($nodes as $node) {
$row = array();
foreach ($view->field as $field) {
if ($fields[$field['id']]['visible'] !== FALSE) {
$cell['data'] = theme('calendar_views_field', $field['queryname'], $fields, $field, $node, $view, $type);
$cell['class'] = "view-field " . views_css_safe('view-field-' . $field['queryname']);
$row[] = $cell;
}
}
$rows[] = $row;
}
if (!empty($rows)) {
$output .= theme('table', $view->table_header, $rows);
}
else {
$output .= views_get_textarea($view, $type, 'empty');
}
return $output;
}