diff --git a/core/modules/views/templates/views-view-fields.tpl.php b/core/modules/views/templates/views-view-fields.tpl.php index dd4461c..ae3a4c6 100644 --- a/core/modules/views/templates/views-view-fields.tpl.php +++ b/core/modules/views/templates/views-view-fields.tpl.php @@ -8,6 +8,7 @@ * - $fields: an array of $field objects. Each one contains: * - $field->content: The output of the field. * - $field->raw: The raw data for the field, if it exists. This is NOT output safe. + * - $field->class: The safe class id to use. * - $field->handler: The Views field handler object controlling this field. Do not use * var_export to dump this object, as it can't handle the recursion. * - $field->inline: Whether or not the field should be inline. @@ -23,7 +24,7 @@ * @ingroup views_templates */ ?> - + $field): ?> separator)): ?> separator; ?> diff --git a/core/modules/views/templates/views-view-grid.tpl.php b/core/modules/views/templates/views-view-grid.tpl.php index a9f7b34..147fa3e 100644 --- a/core/modules/views/templates/views-view-grid.tpl.php +++ b/core/modules/views/templates/views-view-grid.tpl.php @@ -13,11 +13,11 @@

-> +> > - $column): ?> + > diff --git a/core/modules/views/templates/views-view-table.tpl.php b/core/modules/views/templates/views-view-table.tpl.php index 5d98cba..22da745 100644 --- a/core/modules/views/templates/views-view-table.tpl.php +++ b/core/modules/views/templates/views-view-table.tpl.php @@ -9,6 +9,7 @@ * - $fields: An array of CSS IDs to use for each field id. * - $rows: An array of row items. Each row is an array of content. * $rows are keyed by row number, fields within rows are keyed by field ID. + * * @ingroup views_templates */ diff --git a/core/modules/views/templates/views-view.tpl.php b/core/modules/views/templates/views-view.tpl.php index 7864306..ca8faef 100644 --- a/core/modules/views/templates/views-view.tpl.php +++ b/core/modules/views/templates/views-view.tpl.php @@ -14,6 +14,7 @@ * .view-display-id-[display_name] * .view-dom-id-[dom_id] * - $css_name: A css-safe version of the view name. + * - $css_class: The user-specified classes names, if any * - $header: The view header * - $footer: The view footer * - $rows: The results of the view query, if any diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc index ff23b8f..efa6848 100644 --- a/core/modules/views/views.theme.inc +++ b/core/modules/views/views.theme.inc @@ -394,7 +394,7 @@ function template_preprocess_views_view_summary(&$vars) { * unformatted. */ function template_preprocess_views_view_summary_unformatted(&$vars) { - $view = $vars['view']; + $view = $vars['view']; $argument = $view->argument[$view->build_info['summary_level']]; $url_options = array(); @@ -443,7 +443,7 @@ function template_preprocess_views_view_summary_unformatted(&$vars) { * Display a view as a table style. */ function template_preprocess_views_view_table(&$vars) { - $view = $vars['view']; + $view = $vars['view']; // We need the raw data for this grouping, which is passed in as $vars['rows']. // However, the template also needs to use for the rendered fields. We @@ -552,8 +552,7 @@ function template_preprocess_views_view_table(&$vars) { } // Render each field into its appropriate column. - foreach ($result as $num => $content) { - $vars['rows'][$num]['fields'][$column]['content'] = $content; + foreach ($result as $num => $row) { $vars['rows'][$num]['fields'][$column]['attributes'] = new Attribute(array('class' => array())); // Add field classes @@ -637,7 +636,7 @@ function template_preprocess_views_view_table(&$vars) { $vars['attributes']['class'][] = 'views-table'; if (empty($vars['rows']) && !empty($options['empty_table'])) { $vars['rows'][0]['fields'][0]['content'] = $view->display_handler->renderArea('empty'); - // Calculate the amounts of rows with output. + // Calculate the amounts of rows with output. $vars['rows'][0]['fields'][0]['attributes'] = new Attribute(array( 'colspan' => count($vars['header']), 'class' => 'views-empty', diff --git a/t b/t deleted file mode 100644 index 65b6bb9..0000000 --- a/t +++ /dev/null @@ -1,546 +0,0 @@ -diff --git a/core/modules/views/templates/views-view-fields.tpl.php b/core/modules/views/templates/views-view-fields.tpl.php -index ae3a4c6..dd4461c 100644 ---- a/core/modules/views/templates/views-view-fields.tpl.php -+++ b/core/modules/views/templates/views-view-fields.tpl.php -@@ -8,7 +8,6 @@ - * - $fields: an array of $field objects. Each one contains: - * - $field->content: The output of the field. - * - $field->raw: The raw data for the field, if it exists. This is NOT output safe. -- * - $field->class: The safe class id to use. - * - $field->handler: The Views field handler object controlling this field. Do not use - * var_export to dump this object, as it can't handle the recursion. - * - $field->inline: Whether or not the field should be inline. -@@ -24,7 +23,7 @@ - * @ingroup views_templates - */ - ?> -- $field): ?> -+ - separator)): ?> - separator; ?> -  -diff --git a/core/modules/views/templates/views-view-grid.tpl.php b/core/modules/views/templates/views-view-grid.tpl.php -index 43ba37b..a9f7b34 100644 ---- a/core/modules/views/templates/views-view-grid.tpl.php -+++ b/core/modules/views/templates/views-view-grid.tpl.php -@@ -13,13 +13,13 @@ -  -

 -  --
> -+> -  -- $columns): ?> -- > -- $item): ?> --  -  -  -diff --git a/core/modules/views/templates/views-view-list.tpl.php b/core/modules/views/templates/views-view-list.tpl.php -index 2c4b9c5..b310c83 100644 ---- a/core/modules/views/templates/views-view-list.tpl.php -+++ b/core/modules/views/templates/views-view-list.tpl.php -@@ -14,8 +14,8 @@ -

 -  -  -- $row): ?> --
  • >
  •  -+  -+ > -  -  -  -diff --git a/core/modules/views/templates/views-view-summary-unformatted.tpl.php b/core/modules/views/templates/views-view-summary-unformatted.tpl.php -index 2280a71..b63d72e 100644 ---- a/core/modules/views/templates/views-view-summary-unformatted.tpl.php -+++ b/core/modules/views/templates/views-view-summary-unformatted.tpl.php -@@ -9,12 +9,12 @@ - * @ingroup views_templates - */ - ?> -- $row): ?> -+ - '; ?> -- separator)): ?>separator; ?> -- >link; ?> -+  -+ > -  -- (count; ?>) -+ () -  - ' : ''; ?> -  -diff --git a/core/modules/views/templates/views-view-summary.tpl.php b/core/modules/views/templates/views-view-summary.tpl.php -index ce51e70..9c8d305 100644 ---- a/core/modules/views/templates/views-view-summary.tpl.php -+++ b/core/modules/views/templates/views-view-summary.tpl.php -@@ -9,10 +9,10 @@ - ?> -
     -
       -- $row): ?> --
    • >link; ?> -+  -+
    • > -  -- (count?>) -+ () -  -
    •  -  -diff --git a/core/modules/views/templates/views-view-table.tpl.php b/core/modules/views/templates/views-view-table.tpl.php -index 4d44d42..5d98cba 100644 ---- a/core/modules/views/templates/views-view-table.tpl.php -+++ b/core/modules/views/templates/views-view-table.tpl.php -@@ -6,15 +6,9 @@ - * - * - $title : The title of this group of rows. May be empty. - * - $header: An array of header labels keyed by field id. -- * - $header_classes: An array of header classes keyed by field id. - * - $fields: An array of CSS IDs to use for each field id. -- * - $classes: A class or classes to apply to the table, based on settings. -- * - $row_classes: An array of classes to apply to each row, indexed by row -- * number. This matches the index in $rows. - * - $rows: An array of row items. Each row is an array of content. - * $rows are keyed by row number, fields within rows are keyed by field ID. -- * - $field_classes: An array of classes to apply to each field, indexed by -- * field id, then row number. This matches the index in $rows. - * @ingroup views_templates - */ -  -@@ -26,20 +20,20 @@ -  -
     -  -- $label): ?> --  -  -  -  -  -  -- $row): ?> -- > -- $content): ?> --  -  -  -diff --git a/core/modules/views/templates/views-view-unformatted.tpl.php b/core/modules/views/templates/views-view-unformatted.tpl.php -index b7f63b9..cad96f6 100644 ---- a/core/modules/views/templates/views-view-unformatted.tpl.php -+++ b/core/modules/views/templates/views-view-unformatted.tpl.php -@@ -10,8 +10,8 @@ -  -

     -  -- $row): ?> --
    > --  -+ -+
    > -+  -
     -  -diff --git a/core/modules/views/templates/views-view.tpl.php b/core/modules/views/templates/views-view.tpl.php -index ca8faef..7864306 100644 ---- a/core/modules/views/templates/views-view.tpl.php -+++ b/core/modules/views/templates/views-view.tpl.php -@@ -14,7 +14,6 @@ - * .view-display-id-[display_name] - * .view-dom-id-[dom_id] - * - $css_name: A css-safe version of the view name. -- * - $css_class: The user-specified classes names, if any - * - $header: The view header - * - $footer: The view footer - * - $rows: The results of the view query, if any -diff --git a/core/modules/views/views.theme.inc b/core/modules/views/views.theme.inc -index 0bae0fc..63057a7 100644 ---- a/core/modules/views/views.theme.inc -+++ b/core/modules/views/views.theme.inc -@@ -349,7 +349,6 @@ function template_preprocess_views_view_field(&$vars) { - function template_preprocess_views_view_summary(&$vars) { - $view = $vars['view']; - $argument = $view->argument[$view->build_info['summary_level']]; -- $vars['row_classes'] = array(); -  - $url_options = array(); -  -@@ -372,8 +371,8 @@ function template_preprocess_views_view_summary(&$vars) { - $argument->process_summary_arguments($row_args); -  - foreach ($vars['rows'] as $id => $row) { -- -- $vars['rows'][$id]->link = $argument->summary_name($row); -+ $vars['rows'][$id]['attributes'] = new Attribute(array('class' => array())); -+ $vars['rows'][$id]['link'] = $argument->summary_name($row); - $args = $view->args; - $args[$argument->position] = $row_args[$id]; -  -@@ -381,14 +380,12 @@ function template_preprocess_views_view_summary(&$vars) { - if (!empty($argument->options['summary_options']['base_path'])) { - $base_path = $argument->options['summary_options']['base_path']; - } -- $vars['rows'][$id]->url = url($view->getUrl($args, $base_path), $url_options); -- $vars['rows'][$id]->count = intval($row->{$argument->count_alias}); -+ $vars['rows'][$id]['url'] = url($view->getUrl($args, $base_path), $url_options); -+ $vars['rows'][$id]['count'] = intval($row->{$argument->count_alias}); -  -- $vars['row_classes'][$id] = array(); -- if (isset($active_urls[$vars['rows'][$id]->url])) { -- $vars['row_classes'][$id]['class'][] = 'active'; -+ if (isset($active_urls[$vars['rows'][$id]['url']])) { -+ $vars['rows'][$id]['attributes']['class'][] = 'active'; - } -- $vars['row_classes'][$id] = new Attribute($vars['row_classes'][$id]); - } - } -  -@@ -397,9 +394,8 @@ function template_preprocess_views_view_summary(&$vars) { - * unformatted. - */ - function template_preprocess_views_view_summary_unformatted(&$vars) { -- $view = $vars['view']; -+ $view = $vars['view']; - $argument = $view->argument[$view->build_info['summary_level']]; -- $vars['row_classes'] = array(); -  - $url_options = array(); -  -@@ -422,11 +418,12 @@ function template_preprocess_views_view_summary_unformatted(&$vars) { - $argument->process_summary_arguments($row_args); -  - foreach ($vars['rows'] as $id => $row) { -+ $vars['rows'][$id]['attributes'] = new Attribute(array('class' => array())); - // only false on first time: - if ($count++) { -- $vars['rows'][$id]->separator = filter_xss_admin($vars['options']['separator']); -+ $vars['rows'][$id]['separator'] = filter_xss_admin($vars['options']->separator); - } -- $vars['rows'][$id]->link = $argument->summary_name($row); -+ $vars['rows'][$id]['link'] = $argument->summary_name($row); - $args = $view->args; - $args[$argument->position] = $row_args[$id]; -  -@@ -434,13 +431,11 @@ function template_preprocess_views_view_summary_unformatted(&$vars) { - if (!empty($argument->options['summary_options']['base_path'])) { - $base_path = $argument->options['summary_options']['base_path']; - } -- $vars['rows'][$id]->url = url($view->getUrl($args, $base_path), $url_options); -- $vars['rows'][$id]->count = intval($row->{$argument->count_alias}); -- $vars['row_classes'][$id] = array(); -- if (isset($active_urls[$vars['rows'][$id]->url])) { -- $vars['row_classes'][$id]['class'][] = 'active'; -+ $vars['rows'][$id]['url'] = url($view->getUrl($args, $base_path), $url_options); -+ $vars['rows'][$id]['count'] = intval($row->{$argument->count_alias}); -+ if (isset($active_urls[$vars['rows'][$id]['url']])) { -+ $vars['rows'][$id]['attributes']['class'][] = 'active'; - } -- $vars['row_classes'][$id] = new Attribute($vars['row_classes'][$id]); - } - } -  -@@ -448,7 +443,7 @@ function template_preprocess_views_view_summary_unformatted(&$vars) { - * Display a view as a table style. - */ - function template_preprocess_views_view_table(&$vars) { -- $view = $vars['view']; -+ $view = $vars['view']; -  - // We need the raw data for this grouping, which is passed in as $vars['rows']. - // However, the template also needs to use for the rendered fields. We -@@ -457,7 +452,6 @@ function template_preprocess_views_view_table(&$vars) { - // Store rows so that they may be used by further preprocess functions. - $result = $vars['result'] = $vars['rows']; - $vars['rows'] = array(); -- $vars['field_classes'] = array(); - $vars['header'] = array(); -  - $options = $view->style_plugin->options; -@@ -480,6 +474,8 @@ function template_preprocess_views_view_table(&$vars) { - $query += $view->exposed_raw_input; - } -  -+ // A boolean to store whether the table's header has any labels. -+ $has_header_labels = FALSE; - foreach ($columns as $field => $column) { - // Create a second variable so we can easily find what fields we have and what the - // CSS classes should be. -@@ -492,7 +488,7 @@ function template_preprocess_views_view_table(&$vars) { - if ($field == $column && empty($fields[$field]->options['exclude'])) { - $label = check_plain(!empty($fields[$field]) ? $fields[$field]->label() : ''); - if (empty($options['info'][$field]['sortable']) || !$fields[$field]->click_sortable()) { -- $vars['header'][$field] = $label; -+ $vars['header'][$field]['content'] = $label; - } - else { - $initial = !empty($options['info'][$field]['default_sort_order']) ? $options['info'][$field]['default_sort_order'] : 'asc'; -@@ -513,38 +509,41 @@ function template_preprocess_views_view_table(&$vars) { - 'attributes' => array('title' => $title), - 'query' => $query, - ); -- $vars['header'][$field] = l($label, current_path(), $link_options); -+ $vars['header'][$field]['content'] = l($label, current_path(), $link_options); - } -  - // Set up the header label class. -- $vars['header_classes'][$field] = array(); -+ $vars['header'][$field]['attributes'] = new Attribute(array('class' => array())); - if ($fields[$field]->options['element_default_classes']) { -- $vars['header_classes'][$field]['class'][] = 'views-field'; -- $vars['header_classes'][$field]['class'][] = 'views-field-' . $vars['fields'][$field]; -+ $vars['header'][$field]['attributes']['class'][] = 'views-field'; -+ $vars['header'][$field]['attributes']['class'][] = 'views-field-' . $vars['fields'][$field]; - } -- $vars['header_classes'][$field] = new Attribute($vars['header_classes'][$field]); - $class = $fields[$field]->element_label_classes(0); - if ($class) { -- $vars['header_classes'][$field]['class'][] = $class; -+ $vars['header'][$field]['attributes']['class'][] = $class; - } - // Add responsive header classes. - if (!empty($options['info'][$field]['responsive'])) { -- $vars['header_classes'][$field]['class'][] = $options['info'][$field]['responsive']; -+ $vars['header'][$field]['attributes']['class'][] = $options['info'][$field]['responsive']; - $responsive = TRUE; - } - // Add a CSS align class to each field if one was set - if (!empty($options['info'][$field]['align'])) { -- $vars['header_classes'][$field]['class'][] = drupal_clean_css_identifier($options['info'][$field]['align']); -+ $vars['header'][$field]['attributes']['class'][] = drupal_clean_css_identifier($options['info'][$field]['align']); - } -  - // Add a header label wrapper if one was selected. -- if ($vars['header'][$field]) { -+ if ($vars['header'][$field]['content']) { - $element_label_type = $fields[$field]->element_label_type(TRUE, TRUE); - if ($element_label_type) { -- $vars['header'][$field] = '<' . $element_label_type . '>' . $vars['header'][$field] . ''; -+ $vars['header'][$field]['content'] = '<' . $element_label_type . '>' . $vars['header'][$field]['content'] . ''; - } - } -  -+ // Check if header label is not empty. -+ if (!empty($vars['header'][$field]['content'])) { -+ $has_header_labels = TRUE; -+ } - } -  - // Add a CSS align class to each field if one was set -@@ -553,21 +552,23 @@ function template_preprocess_views_view_table(&$vars) { - } -  - // Render each field into its appropriate column. -- foreach ($result as $num => $row) { -+ foreach ($result as $num => $content) { -+ $vars['rows'][$num]['fields'][$column]['content'] = $content; -+ $vars['rows'][$num]['fields'][$column]['attributes'] = new Attribute(array('class' => array())); -+ - // Add field classes -- $vars['field_classes'][$field][$num] = array(); - if ($fields[$field]->options['element_default_classes']) { -- $vars['field_classes'][$field][$num]['class'][] = 'views-field'; -- $vars['field_classes'][$field][$num]['class'][] = 'views-field-' . $vars['fields'][$field]; -+ $vars['rows'][$num]['fields'][$column]['attributes']['class'][] = 'views-field'; -+ $vars['rows'][$num]['fields'][$column]['attributes']['class'][] = 'views-field-' . $vars['fields'][$field]; - } -- $vars['field_classes'][$field][$num] = new Attribute($vars['field_classes'][$field][$num]); -  - if ($classes = $fields[$field]->element_classes($num)) { -- $vars['field_classes'][$field][$num]['class'][] = $classes; -+ $vars['rows'][$num]['fields'][$column]['attributes']['class'][] = $classes; - } -+ - // Add responsive header classes. - if (!empty($options['info'][$field]['responsive'])) { -- $vars['field_classes'][$field][$num]['class'][] = $options['info'][$field]['responsive']; -+ $vars['rows'][$num]['fields'][$column]['attributes']['class'][] = $options['info'][$field]['responsive']; - } -  - if (!empty($fields[$field]) && empty($fields[$field]->options['exclude'])) { -@@ -578,21 +579,21 @@ function template_preprocess_views_view_table(&$vars) { - } -  - // Don't bother with separators and stuff if the field does not show up. -- if (empty($field_output) && !empty($vars['rows'][$num][$column])) { -+ if (empty($field_output) && !empty($vars['rows'][$num]['fields'][$column]['content'])) { - continue; - } -  - // Place the field into the column, along with an optional separator. -- if (!empty($vars['rows'][$num][$column])) { -+ if (!empty($variables['rows'][$num][$column]['content'])) { - if (!empty($options['info'][$column]['separator'])) { -- $vars['rows'][$num][$column] .= filter_xss_admin($options['info'][$column]['separator']); -+ $vars['rows'][$num]['fields'][$column]['content'] .= filter_xss_admin($options['info'][$column]['separator']); - } - } - else { -- $vars['rows'][$num][$column] = ''; -+ $vars['rows'][$num]['fields'][$column]['content'] = ''; - } -  -- $vars['rows'][$num][$column] .= $field_output; -+ $vars['rows'][$num]['fields'][$column]['content'] .= $field_output; - } - } -  -@@ -612,33 +613,32 @@ function template_preprocess_views_view_table(&$vars) { - } -  - // Hide table header if all labels are empty. -- if (!array_filter($vars['header'])) { -+ if (!$has_header_labels) { - $vars['header'] = array(); - } -  - $count = 0; - foreach ($vars['rows'] as $num => $row) { -- $vars['row_classes'][$num] = array(); -+ $vars['rows'][$num]['attributes'] = new Attribute(array('class' => array())); - if ($row_class_special) { -- $vars['row_classes'][$num]['class'][] = ($count++ % 2 == 0) ? 'odd' : 'even'; -+ $vars['rows'][$num]['attributes']['class'][] = ($count++ % 2 == 0) ? 'odd' : 'even'; - if ($num === 0) { -- $vars['row_classes'][$num]['class'][] = 'views-row-first'; -+ $vars['rows'][$num]['attributes']['class'][] = 'views-row-first'; - } - elseif ($num === (count($vars['rows']) - 1)) { -- $vars['row_classes'][$num]['class'][] = 'views-row-last'; -+ $vars['rows'][$num]['attributes']['class'][] = 'views-row-last'; - } - } - if ($row_class = $handler->get_row_class($num)) { -- $vars['row_classes'][$num]['class'][] = $row_class; -+ $vars['rows'][$num]['attributes']['class'][] = $row_class; - } -- $vars['row_classes'][$num] = new Attribute($vars['row_classes'][$num]); - } -  - $vars['attributes']['class'][] = 'views-table'; - if (empty($vars['rows']) && !empty($options['empty_table'])) { -- $vars['rows'][0][0] = $view->display_handler->renderArea('empty'); -- // Calculate the amounts of rows with output. -- $vars['field_classes'][0][0] = new Attribute(array( -+ $vars['rows'][0]['fields'][0]['content'] = $view->display_handler->renderArea('empty'); -+ // Calculate the amounts of rows with output. -+ $vars['rows'][0]['fields'][0]['attributes'] = new Attribute(array( - 'colspan' => count($vars['header']), - 'class' => 'views-empty', - )); -@@ -739,37 +739,38 @@ function template_preprocess_views_view_grid(&$vars) { -  - // Apply the row classes - foreach ($rows as $row_number => $row) { -- $row_classes = array(); -+ $vars['rows'][$id]['attributes'] = new attribute(array('class' => array())); -+ - if ($default_row_class) { -- $row_classes['class'][] = 'row-' . ($row_number + 1); -+ $vars['rows'][$id]['attributes']['class'][] = 'row-' . ($row_number + 1); - } - if ($row_class_special) { - if ($row_number == 0) { -- $row_classes['class'][] = 'row-first'; -+ $vars['rows'][$id]['attributes']['class'][] = 'row-first'; - } - if (count($rows) == ($row_number + 1)) { -- $row_classes['class'][] = 'row-last'; -+ $vars['rows'][$id]['attributes']['class'][] = 'row-last'; - } - } -- $row_classes = new Attribute($row_classes); -  -- foreach ($rows[$row_number] as $column_number => $item) { -- $vars['column_classes'][$row_number][$column_number] = array(); -+ foreach ($row as $column_number => $item) { -+ $vars['rows'][$id]['columns'][$column_number]['content'] = $item; -+ $vars['rows'][$id]['columns'][$column_number]['attributes'] = new attribute(array('class' => array())); -+ - if ($default_row_class) { -- $vars['column_classes'][$row_number][$column_number]['class'][] = 'col-' . ($column_number + 1); -+ $vars['rows'][$id]['columns'][$column_number]['attributes']['class'][] = 'col-' . ($column_number + 1); - } - if ($row_class_special) { - if ($column_number == 0) { -- $vars['column_classes'][$row_number][$column_number]['class'][] = 'col-first'; -+ $vars['rows'][$id]['columns'][$column_number]['attributes']['class'][] = 'col-first'; - } - elseif (count($rows[$row_number]) == ($column_number + 1)) { -- $vars['column_classes'][$row_number][$column_number]['class'][] = 'col-last'; -+ $vars['rows'][$id]['columns'][$column_number]['attributes']['class'][] = 'col-last'; - } - } - if (isset($row_indexes[$row_number][$column_number]) && $column_class = $view->style_plugin->get_row_class($row_indexes[$row_number][$column_number])) { -- $vars['column_classes'][$row_number][$column_number]['class'][] = $column_class; -+ $vars['rows'][$id]['columns'][$column_number]['attributes']['class'][] = $column_class; - } -- $vars['column_classes'][$row_number][$column_number] = new Attribute($vars['column_classes'][$row_number][$column_number]); - } - } - $vars['rows'] = $rows; -@@ -796,34 +797,34 @@ function template_preprocess_views_view_unformatted(&$vars) { - $style = $view->style_plugin; - $options = $style->options; -  -- $vars['row_classes'] = array(); -- $vars['classes'] = array(); - $default_row_class = isset($options['default_row_class']) ? $options['default_row_class'] : FALSE; - $row_class_special = isset($options['row_class_special']) ? $options['row_class_special'] : FALSE; - // Set up striping values. - $count = 0; - $max = count($rows); - foreach ($rows as $id => $row) { -- $vars['row_classes'][$id] = array(); -+ $vars['rows'][$id] = array(); -+ $vars['rows'][$id]['content'] = $row; -+ $vars['rows'][$id]['attributes'] = new attribute(array('class' => array())); -+ - $count++; - if ($default_row_class) { -- $vars['row_classes'][$id]['class'][] = 'views-row'; -- $vars['row_classes'][$id]['class'][] = 'views-row-' . $count; -+ $vars['rows'][$id]['attributes']['class'][] = 'views-row'; -+ $vars['rows'][$id]['attributes']['class'][] = 'views-row-' . $count; - } - if ($row_class_special) { -- $vars['row_classes'][$id]['class'][] = 'views-row-' . ($count % 2 ? 'odd' : 'even'); -+ $vars['rows'][$id]['attributes']['class'][] = 'views-row-' . ($count % 2 ? 'odd' : 'even'); - if ($count == 1) { -- $vars['row_classes'][$id]['class'][] = 'views-row-first'; -+ $vars['rows'][$id]['attributes']['class'][] = 'views-row-first'; - } - if ($count == $max) { -- $vars['row_classes'][$id]['class'][] = 'views-row-last'; -+ $vars['rows'][$id]['attributes']['class'][] = 'views-row-last'; - } - } -  - if ($row_class = $view->style_plugin->get_row_class($id)) { -- $vars['row_classes'][$id]['class'][] = $row_class; -+ $vars['rows'][$id]['attributes']['class'][] = $row_class; - } -- $vars['row_classes'][$id] = new Attribute($vars['row_classes'][$id]); - } - } - 
    > --  -+  -+ > -+ $column): ?> -+ > -+  -
    scope="col"> --  -+  -+ scope="col"> -+  -
    > --  -+  -+ > -+  -+ > -+  -