function theme_path_breadcrumbs_ui_breadcrumbs_list in Path Breadcrumbs 7.3
Same name and namespace in other branches
- 7.2 path_breadcrumbs_ui/path_breadcrumbs_ui.theme.inc \theme_path_breadcrumbs_ui_breadcrumbs_list()
Theming function for path_breadcrumbs_ui_breadcrumbs_list form.
File
- path_breadcrumbs_ui/
path_breadcrumbs_ui.theme.inc, line 78
Code
function theme_path_breadcrumbs_ui_breadcrumbs_list($vars) {
$form = $vars['form'];
$rows = array();
foreach (element_children($form) as $path_id) {
if (isset($form[$path_id]['weight'])) {
$row = array();
$row[] = filter_xss_admin(render($form[$path_id]['title']));
$row[] = check_plain(render($form[$path_id]['name']));
$row[] = check_plain(render($form[$path_id]['path']));
$row[] = render($form[$path_id]['actions']);
$row[] = render($form[$path_id]['weight']);
$class = 'enabled';
if ($form[$path_id]['disabled']['#value'] == TRUE) {
$class = 'disabled';
}
$rows[] = array(
'data' => $row,
'class' => array(
'draggable',
$class,
),
);
}
}
if (empty($rows)) {
$rows = array(
array(
'data' => array(
array(
'data' => t('There are no created path breadcrumbs yet.'),
'colspan' => 5,
),
),
),
);
}
$header = array(
t('Title'),
t('Name'),
t('Path'),
t('Actions'),
t('Weight'),
);
$output = theme('table', array(
'header' => $header,
'rows' => $rows,
'attributes' => array(
'id' => 'path-breadcrumbs-ui-table-list',
),
));
drupal_add_tabledrag('path-breadcrumbs-ui-table-list', 'order', 'sibling', 'path-breadcrumbs-ui-table-weight');
return $output . drupal_render_children($form);
}