You are here

function theme_domain_content_admin_nodes in Domain Access 6.2

Same name and namespace in other branches
  1. 5 domain_content/domain_content.module \theme_domain_content_admin_nodes()

Replaces the default theme function for the node administration form.

Parameters

$form: FormsAPI representation of the batch node edit form.

Return value

A themed HTML form.

File

domain_content/domain_content.admin.inc, line 306
Administration pages for Domain Content.

Code

function theme_domain_content_admin_nodes($form) {

  // Overview table:
  $header = array(
    theme('table_select_header_cell'),
    t('Title'),
    t('Affiliates'),
    t('Type'),
    t('Author'),
    t('Status'),
    t('Operations'),
  );
  $output = '';
  $output .= drupal_render($form['domain']);
  $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['domains'][$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;
}