function theme_custom_breadcrumbs_module_weight in Custom Breadcrumbs 7.2
Same name and namespace in other branches
- 6.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 721 - Admin page callback file for the custom_breadcrumbs module.
Code
function theme_custom_breadcrumbs_module_weight($variables) {
$form = $variables['form'];
$header = array(
t('Module Name'),
t('Weight'),
);
$rows = array();
foreach (element_children($form) as $key) {
if (isset($form[$key]['name'])) {
$row = array();
$row[] = drupal_render($form[$key]['name']);
if (isset($form[$key]['weight'])) {
$form[$key]['weight']['#attributes']['class'] = array(
'module-weight',
);
$row[] = drupal_render($form[$key]['weight']);
}
$rows[] = array(
'data' => $row,
'class' => array(
'draggable',
),
);
}
}
drupal_add_tabledrag('custom_breadcrumbs', 'order', 'self', 'module-weight');
$output = theme('table', array(
'header' => $header,
'rows' => $rows,
'attributes' => array(
'id' => 'custom_breadcrumbs',
),
));
$output .= drupal_render_children($form);
return $output;
}