You are here

function theme_node_convert_bulk in Node Convert 5

File

./node_convert.module, line 300

Code

function theme_node_convert_bulk($form) {
  if ($form['step']['#value'] == "choose_source_dest_type") {
    $output = '<div>' . t("Choose the source type of the nodes that should be shown, and the destination type to which they will be converted.") . '</div>';
    $output .= drupal_render($form);
  }
  elseif ($form['step']['#value'] == "choose_nodes") {
    $header = array(
      theme('table_select_header_cell'),
      t("Title"),
      t("Type"),
      t("Author"),
      t("Status"),
    );
    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['type'][$key]);
      $row[] = drupal_render($form['author'][$key]);
      $row[] = drupal_render($form['status'][$key]);
      $rows[] = $row;
    }
    $output = '<div>' . t("Choose the nodes that will be converted.") . '</div>';
    $output .= theme('table', $header, $rows);
    $output .= drupal_render($form);
  }
  elseif ($form['step']['#value'] == "choose_fields") {
    $output = '<div>' . t("Choose the fields where the values should be stored.") . '</div>';
    $info = unserialize($form['info']['#value']);
    if ($info['no_fields'] == TRUE) {
      $output .= '<div>' . t("There are no cck fields to convert. Please press submit.") . '</div>';
    }
    $output .= drupal_render($form);
  }
  return $output;
}