You are here

function theme_node_admin_nodes in Drupal 5

Same name and namespace in other branches
  1. 4 modules/node.module \theme_node_admin_nodes()
  2. 6 modules/node/node.admin.inc \theme_node_admin_nodes()

Theme node administration overview.

File

modules/node/node.module, line 1655
The core that allows content to be submitted to the site. Modules and scripts may programmatically submit nodes using the usual form API pattern.

Code

function theme_node_admin_nodes($form) {

  // Overview table:
  $header = array(
    theme('table_select_header_cell'),
    t('Title'),
    t('Type'),
    t('Author'),
    t('Status'),
    t('Operations'),
  );
  $output .= drupal_render($form['options']);
  if (isset($form['title']) && is_array($form['title'])) {
    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]);
      $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;
}