You are here

function theme_image_import_form in Image 5.2

Same name and namespace in other branches
  1. 5 contrib/image_import/image_import.module \theme_image_import_form()
  2. 6 contrib/image_import/image_import.pages.inc \theme_image_import_form()
  3. 7 contrib/image_import/image_import.pages.inc \theme_image_import_form()

File

contrib/image_import/image_import.module, line 148

Code

function theme_image_import_form($form) {
  $output = '';
  if (isset($form['import_file']) && $form['import_file']['#type'] == 'checkboxes') {
    $header = array(
      theme('table_select_header_cell'),
      t('Name'),
      t('Size'),
      t('Dimensions'),
      t('Title'),
      t('Body'),
    );
    $rows = array();
    foreach (element_children($form['import_file']) as $key) {
      $filename = $form['import_file'][$key]['#title'];
      unset($form['import_file'][$key]['#title']);
      $rows[] = array(
        drupal_render($form['import_file'][$key]),
        $filename,
        drupal_render($form['files']['filesize'][$key]),
        drupal_render($form['files']['dimensions'][$key]),
        drupal_render($form['files']['title'][$key]),
        drupal_render($form['files']['body'][$key]),
      );
    }
    $output .= theme('table', $header, $rows);
  }
  return $output . drupal_render($form);
}