You are here

function theme_uc_attribute_bulk_update_form in Ubercart 6.2

Displays the bulk product update form.

See also

uc_attribute_bulk_update_form()

File

uc_attribute/uc_attribute.admin.inc, line 243
Attribute administration menu items.

Code

function theme_uc_attribute_bulk_update_form($form) {
  $output = '';
  $has_products = isset($form['title']) && is_array($form['title']);
  $header[] = theme('table_select_header_cell');
  $header[] = t('Title');
  $header[] = t('Status');
  $header[] = t('Type');
  if ($has_products) {
    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['status'][$key]);
      $row[] = drupal_render($form['type'][$key]);
      $rows[] = $row;
    }
  }
  else {
    $rows[] = array(
      array(
        'data' => t('No products available.'),
        'colspan' => '6',
      ),
    );
  }
  $output .= theme('table', $header, $rows);
  if ($form['pager']['#value']) {
    $output .= drupal_render($form['pager']);
  }
  $output .= drupal_render($form);
  $output .= '<p>' . t('Flush actions take place immediately and cannot be undone.') . '</p>';
  return $output;
}