o #343047 by alienbrain: Allow all handlers to participate in view validation.
o #339223 by greggles: Allow taxonomy term tid to be sortable.
o #324378 by eigentor: CSS improvements to the view list page.
- o #354736 by Shai: Clarification on exposed filter text.
\ No newline at end of file
+ o #354736 by Shai: Clarification on exposed filter text.
+ o #364637 by moshe and dww: Allow preprocessors to add row classes to table style.
\ No newline at end of file
}
}
+ foreach ($vars['rows'] as $num => $row) {
+ $vars['row_classes'][$num][] = ($num % 2 == 0) ? 'odd' : 'even';
+ }
+
$vars['class'] = 'views-table';
if (!empty($options['sticky'])) {
drupal_add_js('misc/tableheader.js');
* - $header: An array of header labels keyed by field id.
* - $fields: An array of CSS IDs to use for each field id.
* - $class: A class or classes to apply to the table, based on settings.
- * - $rows: An array of row items. Each row is an array of content
- * keyed by field ID.
+ * - $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.
* @ingroup views_templates
*/
?>
</thead>
<tbody>
<?php foreach ($rows as $count => $row): ?>
- <tr class="<?php print ($count % 2 == 0) ? 'odd' : 'even';?>">
+ <tr class="<?php print implode(' ', $row_classes[$count]); ?>">
<?php foreach ($row as $field => $content): ?>
<td class="views-field views-field-<?php print $fields[$field]; ?>">
<?php print $content; ?>