You are here

function theme_views_view_table in Views (for Drupal 7) 5

Display the nodes of a view as a table.

File

./views.module, line 1441

Code

function theme_views_view_table($view, $nodes, $type) {
  $fields = _views_get_fields();
  foreach ($nodes as $node) {
    $row = array();
    foreach ($view->field as $field) {
      if ($fields[$field['id']]['visible'] !== FALSE) {
        $cell['data'] = views_theme_field('views_handle_field', $field['queryname'], $fields, $field, $node, $view);
        $cell['class'] = "view-field " . views_css_safe('view-field-' . $field['queryname']);
        $row[] = $cell;
      }
    }
    $rows[] = $row;
  }
  return theme('table', $view->table_header, $rows);
}