function theme_custom_breadcrumbs_module_weight in Custom Breadcrumbs 6.2
Same name and namespace in other branches
- 7.2 custom_breadcrumbs.admin.inc \theme_custom_breadcrumbs_module_weight()
Returns HTML for the module weights as a sortable list.
See also
custom_breadcrumbs_module_weight()
File
- ./
custom_breadcrumbs.admin.inc, line 642 - Admin page callback file for the custom_breadcrumbs module.
Code
function theme_custom_breadcrumbs_module_weight($form) {
$rows = array();
foreach (element_children($form) as $key) {
if (isset($form[$key]['name'])) {
$module =& $form[$key];
$row = array();
$row[] = drupal_render($module['name']);
if (isset($module['weight'])) {
$module['weight']['#attributes']['class'] = 'module-weight';
$row[] = drupal_render($module['weight']);
}
$rows[] = array(
'data' => $row,
'class' => 'draggable',
);
}
}
$header = array(
t('Module Name'),
);
$header[] = t('Weight');
drupal_add_tabledrag('custom_breadcrumbs', 'order', 'self', 'module-weight');
return theme('table', $header, $rows, array(
'id' => 'custom_breadcrumbs',
)) . drupal_render($form);
}