function theme_filter_admin_order
6.x filter.admin.inc | theme_filter_admin_order($form) |
Theme filter order configuration form.
Related topics
File
- drupal-6.x/
modules/ filter/ filter.admin.inc, line 360 - Admin page callbacks for the filter module.
Code
function theme_filter_admin_order($form) {
$header = array(t('Name'), t('Weight'));
$rows = array();
foreach (element_children($form['names']) as $id) {
// Don't take form control structures.
if (is_array($form['names'][$id])) {
$form['weights'][$id]['#attributes']['class'] = 'filter-order-weight';
$rows[] = array(
'data' => array(drupal_render($form['names'][$id]), drupal_render($form['weights'][$id])),
'class' => 'draggable',
);
}
}
$output = theme('table', $header, $rows, array('id' => 'filter-order'));
$output .= drupal_render($form);
drupal_add_tabledrag('filter-order', 'order', 'sibling', 'filter-order-weight', NULL, NULL, FALSE);
return $output;
}