function theme_views_ui_style_plugin_table in Views (for Drupal 7) 6.2
Same name and namespace in other branches
- 8.3 views_ui/theme/theme.inc \theme_views_ui_style_plugin_table()
- 6.3 includes/admin.inc \theme_views_ui_style_plugin_table()
- 7.3 includes/admin.inc \theme_views_ui_style_plugin_table()
Theme the form for the table style plugin
File
Code
function theme_views_ui_style_plugin_table($form) {
$output = drupal_render($form['description_markup']);
$header = array(
t('Field'),
t('Column'),
t('Separator'),
array(
'data' => t('Sortable'),
'align' => 'center',
),
array(
'data' => t('Default sort'),
'align' => 'center',
),
);
$rows = array();
foreach (element_children($form['columns']) as $id) {
$row = array();
$row[] = drupal_render($form['info'][$id]['name']);
$row[] = drupal_render($form['columns'][$id]);
$row[] = drupal_render($form['info'][$id]['separator']);
if (!empty($form['info'][$id]['sortable'])) {
$row[] = array(
'data' => drupal_render($form['info'][$id]['sortable']),
'align' => 'center',
);
$row[] = array(
'data' => drupal_render($form['default'][$id]),
'align' => 'center',
);
}
else {
$row[] = '';
$row[] = '';
}
$rows[] = $row;
}
// Add the special 'None' row.
$rows[] = array(
t('None'),
'',
'',
'',
array(
'align' => 'center',
'data' => drupal_render($form['default'][-1]),
),
);
$output .= theme('table', $header, $rows);
$output .= drupal_render($form);
return $output;
}