function theme_node_admin_nodes in Drupal 6
Same name and namespace in other branches
- 4 modules/node.module \theme_node_admin_nodes()
- 5 modules/node/node.module \theme_node_admin_nodes()
Theme node administration overview.
Related topics
File
- modules/
node/ node.admin.inc, line 551 - Content administration and module settings UI.
Code
function theme_node_admin_nodes($form) {
// If there are rows in this form, then $form['title'] contains a list of
// the title form elements.
$has_posts = isset($form['title']) && is_array($form['title']);
$select_header = $has_posts ? theme('table_select_header_cell') : '';
$header = array(
$select_header,
t('Title'),
t('Type'),
t('Author'),
t('Status'),
);
if (isset($form['language'])) {
$header[] = t('Language');
}
$header[] = t('Operations');
$output = '';
$output .= drupal_render($form['options']);
if ($has_posts) {
foreach (element_children($form['title']) as $key) {
$row = array();
$row[] = drupal_render($form['nodes'][$key]);
$row[] = drupal_render($form['title'][$key]);
$row[] = drupal_render($form['name'][$key]);
$row[] = drupal_render($form['username'][$key]);
$row[] = drupal_render($form['status'][$key]);
if (isset($form['language'])) {
$row[] = drupal_render($form['language'][$key]);
}
$row[] = drupal_render($form['operations'][$key]);
$rows[] = $row;
}
}
else {
$rows[] = array(
array(
'data' => t('No posts available.'),
'colspan' => '6',
),
);
}
$output .= theme('table', $header, $rows);
if ($form['pager']['#value']) {
$output .= drupal_render($form['pager']);
}
$output .= drupal_render($form);
return $output;
}