--- views_tabs_orig/includes/views_tabs_plugin_style.inc 2010-02-03 12:35:54.000000000 -0500 +++ views_tabs/includes/views_tabs_plugin_style.inc 2010-07-02 14:04:21.000000000 -0400 @@ -6,6 +6,7 @@ class views_tabs_plugin_style extends vi $options['tab_field'] = 'title'; } } + function options_form(&$form, &$form_state) { parent::options_form($form, $form_state); if ($this->uses_fields() && $this->definition['uses grouping']) { @@ -25,8 +26,14 @@ class views_tabs_plugin_style extends vi '#options' => $opt, '#default_value' => $options['tab_field'], ); + $form['vertical_field'] = array( + '#title' => t('Use vertical tabs'), + '#type' => 'checkbox', + '#default_value' => $options['vertical_field'], + ); } } + function render() { $this->definition['theme'] = $this->row_plugin->definition['theme']; if ($this->uses_row_plugin() && empty($this->row_plugin)) { @@ -37,6 +44,15 @@ class views_tabs_plugin_style extends vi '#type' => 'tabset', '#sorted' => true, ); + + if ($this->options['vertical_field']) { + $tabset['#attributes'] = array( + 'class' => 'views-tabs-vertical', + ); + drupal_add_css(drupal_get_path('module', 'views_tabs') . '/views_tabs.css'); + } + + // Group the rows according to the grouping field, if specified. $sets = $this->render_grouping($this->view->result, $this->options['grouping']); // Render each group separately and concatenate. Plugins may override this @@ -80,7 +96,7 @@ class views_tabs_plugin_style extends vi ); } else if ($this->uses_fields()) { $tabset[$title]['#content'] .= $content; - } + } } unset($this->view->row_index); return drupal_render($tabset);