function theme_uc_shipping_new_package_fieldset in Ubercart 7.3
Same name and namespace in other branches
- 5 shipping/uc_shipping/uc_shipping.module \theme_uc_shipping_new_package_fieldset()
- 6.2 shipping/uc_shipping/uc_shipping.admin.inc \theme_uc_shipping_new_package_fieldset()
Formats and displays the products in a shipping type fieldset.
See also
File
- shipping/
uc_shipping/ uc_shipping.admin.inc, line 194 - Shipping administration menu items.
Code
function theme_uc_shipping_new_package_fieldset($variables) {
$fieldset = $variables['fieldset'];
drupal_add_js('misc/tableselect.js');
$output = '';
$header = array(
array(
'class' => array(
'select-all',
),
),
t('SKU'),
t('Title'),
theme('uc_qty_label'),
t('Package'),
);
$rows = array();
foreach (element_children($fieldset) as $op_id) {
$row = array();
$row[] = drupal_render($fieldset[$op_id]['checked']);
$row[] = drupal_render($fieldset[$op_id]['model']);
$row[] = drupal_render($fieldset[$op_id]['name']);
$row[] = drupal_render($fieldset[$op_id]['qty']);
$row[] = drupal_render($fieldset[$op_id]['package']);
$rows[] = $row;
}
$output .= theme('table', array(
'header' => $header,
'rows' => $rows,
'empty' => t('There are no products available for this type of package.'),
));
$output .= drupal_render_children($fieldset);
return $output;
}