You are here

function views_plugin_style_grid::options_form in Views (for Drupal 7) 6.2

Same name and namespace in other branches
  1. 6.3 plugins/views_plugin_style_grid.inc \views_plugin_style_grid::options_form()
  2. 7.3 plugins/views_plugin_style_grid.inc \views_plugin_style_grid::options_form()

Render the given style.

Overrides views_plugin_style::options_form

File

plugins/views_plugin_style_grid.inc, line 30
Contains the grid style plugin.

Class

views_plugin_style_grid
Style plugin to render each item in a grid cell.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['columns'] = array(
    '#type' => 'textfield',
    '#title' => t('Number of columns'),
    '#default_value' => $this->options['columns'],
  );
  $form['alignment'] = array(
    '#type' => 'radios',
    '#title' => t('Alignment'),
    '#options' => array(
      'horizontal' => t('Horizontal'),
      'vertical' => t('Vertical'),
    ),
    '#default_value' => $this->options['alignment'],
    '#description' => t('Horizontal alignment will place items starting in the upper left and moving right. Vertical alignment will place items starting in the upper left and moving down.'),
  );
  $form['fill_single_line'] = array(
    '#type' => 'checkbox',
    '#title' => t('Fill up single line'),
    '#description' => t('If you disable this option a grid with only one row will have the amount of items as tds. If you disable it this can cause problems with your css.'),
    '#default_value' => !empty($this->options['fill_single_line']),
  );
  $form['summary'] = array(
    '#type' => 'textfield',
    '#title' => t('Table summary'),
    '#description' => t('This value will be displayed as table-summary attribute in the html. Set this for better accessiblity of your site.'),
    '#default_value' => $this->options['summary'],
  );
}