function theme_menu_block_menu_order in Menu Block 6.2
Same name and namespace in other branches
- 7.3 menu_block.admin.inc \theme_menu_block_menu_order()
- 7.2 menu_block.admin.inc \theme_menu_block_menu_order()
Theme a drag-to-reorder table of menu selection checkboxes.
1 theme call to theme_menu_block_menu_order()
- menu_block_admin_settings_form in ./
menu_block.admin.inc - Menu block admin settings form.
File
- ./
menu_block.admin.inc, line 458 - Provides infrequently used functions for menu_block.
Code
function theme_menu_block_menu_order($element) {
drupal_add_tabledrag('menu-block-menus', 'order', 'sibling', 'menu-weight');
$header = array(
t('Menu'),
t('Available'),
t('Weight'),
);
// Generate table of draggable menu names.
$rows = array();
foreach (element_children($element) as $menu_name) {
$element[$menu_name]['weight']['#attributes']['class'] = 'menu-weight';
$rows[] = array(
'data' => array(
drupal_render($element[$menu_name]['title']),
drupal_render($element[$menu_name]['available']),
drupal_render($element[$menu_name]['weight']),
),
'class' => 'draggable',
);
}
return theme('table', $header, $rows, array(
'id' => 'menu-block-menus',
));
}