| 1 |
<?php
|
| 2 |
// $Id: comment.views_default.inc,v 1.6 2008/06/10 21:30:43 merlinofchaos Exp $
|
| 3 |
/**
|
| 4 |
* @file
|
| 5 |
* Contains the list style plugin.
|
| 6 |
*/
|
| 7 |
|
| 8 |
/**
|
| 9 |
* Style plugin to render each item in an ordered or unordered list.
|
| 10 |
*
|
| 11 |
* @ingroup views_style_plugins
|
| 12 |
*/
|
| 13 |
class views_plugin_style_list extends views_plugin_style {
|
| 14 |
/**
|
| 15 |
* Set default options
|
| 16 |
*/
|
| 17 |
function option_definition() {
|
| 18 |
$options = parent::option_definition();
|
| 19 |
|
| 20 |
$options['type'] = array('default' => 'ul');
|
| 21 |
|
| 22 |
return $options;
|
| 23 |
}
|
| 24 |
|
| 25 |
/**
|
| 26 |
* Render the given style.
|
| 27 |
*/
|
| 28 |
function options_form(&$form, &$form_state) {
|
| 29 |
parent::options_form($form, $form_state);
|
| 30 |
$form['type'] = array(
|
| 31 |
'#type' => 'radios',
|
| 32 |
'#title' => t('List type'),
|
| 33 |
'#options' => array('ul' => t('Unordered list'), 'ol' => t('Ordered list')),
|
| 34 |
'#default_value' => $this->options['type'],
|
| 35 |
);
|
| 36 |
}
|
| 37 |
}
|
| 38 |
|